1- name : Anima Build and Deploy action
1+ name : Build Anima
2+
23on :
34 push :
45 branches :
1011 PRERELEASE : false
1112
1213jobs :
13- build :
14- # strategy:
15- # matrix:
16- # os: [windows-latest, ubuntu-latest]
17-
18- # runs-on: ${{ matrix.os }}
19-
14+ build-windows :
2015 runs-on : windows-latest
21-
16+ env :
17+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
2218 steps :
23- - name : Checkout Code
24- uses : actions/checkout@v4
25-
26- - name : Install Qt
27- uses : jurplel/install-qt-action@v3
28- # with:
29- # version: '6.5.3'
30- # arch: ${{ matrix.os == 'windows-latest' && 'win64_msvc2019_64' || 'gcc_64' }}
19+ - uses : actions/checkout@v4
20+ - uses : actions/setup-node@v4
3121 with :
32- version : ' 6.8.3'
33- arch : ' win64_msvc2022_64'
34-
35- - name : Setup MSVC (Windows Only)
36- # if: matrix.os == 'windows-latest'
37- uses : ilammy/msvc-dev-cmd@v1
38-
39- # - name: Install Linux Deps
40- # if: matrix.os == 'ubuntu-latest'
41- # run: |
42- # sudo apt-get update
43- # sudo apt-get install -y libgl1-mesa-dev libxkbcommon-x11-0
44-
45- - name : Configure CMake
46- run : cmake -B build -DCMAKE_BUILD_TYPE=Release
47-
48- - name : Build Project
49- run : cmake --build build --config Release
50-
51- - name : Bundle Windows
52- # if: matrix.os == 'windows-latest'
53- run : windeployqt --qmldir . build/Release/Anima.exe
22+ node-version : 20
23+ - run : npm install
24+ - run : npm run dist:win -- --publish never
25+ - uses : actions/upload-artifact@v4
26+ with :
27+ name : windows-builds
28+ path : dist/Anima-v*/*.exe
5429
55- - name : Create ZIP
56- uses : thedoctor0/zip-release@main
30+ build-linux :
31+ runs-on : ubuntu-latest
32+ env :
33+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
34+ steps :
35+ - uses : actions/checkout@v4
36+ - uses : actions/setup-node@v4
5737 with :
58- type : ' zip'
59- directory : ' build/Release'
60- filename : Anima-v2.zip
38+ node-version : 20
39+ - run : npm install
40+ - run : npm run dist:linux -- --publish never
41+ - uses : actions/upload-artifact@v4
42+ with :
43+ name : linux-builds
44+ path : dist/Anima-v*/*.AppImage
45+
46+ release :
47+ needs : [build-windows, build-linux]
48+ runs-on : ubuntu-latest
49+ permissions :
50+ contents : write
51+ steps :
52+ - uses : actions/checkout@v4
6153
62- - name : Save Private Test Build
63- uses : actions/upload-artifact@v4
54+ - uses : actions/download-artifact@v4
6455 with :
65- name : Testing-Build
66- path : " **/*.zip "
56+ path : artifacts
57+ merge-multiple : true
6758
68- - name : Create Official Release
69- if : github.event_name == 'workflow_dispatch'
70- uses : softprops/action-gh-release@v1
59+ - name : Create or update release
60+ uses : softprops/action-gh-release@v2
7161 with :
72- tag_name : ${{ github.event.inputs.release_name }}
73- name : Anima ${{ github.event.inputs.release_name }}
62+ tag_name : ${{ env.TAG }}
63+ name : ${{ env.PRERELEASE == 'true' && format('Pre-release {0}', env.TAG) || format('Release {0}', env.TAG) }}
64+ prerelease : ${{ env.PRERELEASE == 'true' }}
65+ target_commitish : ${{ env.PRERELEASE == 'true' && 'dev' || 'main' }}
7466 body_path : CHANGELOG.md
75- prerelease : ${{ github.event.inputs.is_prerelease }}
76- files : " **/*.zip"
77- env :
78- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
67+ files : artifacts/**/*
68+ fail_on_unmatched_files : false
0 commit comments