-
-
Notifications
You must be signed in to change notification settings - Fork 14
60 lines (51 loc) · 1.41 KB
/
release-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Release Build
on:
push:
branches:
- release
tags:
- "v*"
jobs:
release-build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12.2
architecture: x64
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Windows Build
if: runner.os == 'Windows'
shell: pwsh
run: |
./build_executable.ps1
$tagName = "${{ github.ref_name }}"
Rename-Item ./dist/palworld-pal-editor.exe "palworld-pal-editor-$tagName-${{ matrix.os }}.exe"
- name: Unix-like Build
if: runner.os != 'Windows'
shell: bash
run: |
./build_executable.sh
tagName=${GITHUB_REF#refs/tags/}
mv ./dist/palworld-pal-editor ./dist/palworld-pal-editor-$tagName-${{ matrix.os }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: Palworld_Pal_Editor_${{ matrix.os }}_artifact
path: ./dist/
- name: Create and Upload Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: dist/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}