66 - ' v*.*.*'
77
88jobs :
9- prepare-assets :
10- name : Prepare Assets
11- runs-on : ubuntu-latest
9+ build-and-release :
10+ name : Build and Release
11+ runs-on : macos-latest
12+ permissions :
13+ contents : write
14+
1215 steps :
1316 - name : Checkout code
1417 uses : actions/checkout@v4
@@ -19,68 +22,27 @@ jobs:
1922 node-version : ' 18'
2023 cache : ' npm'
2124
22- - name : Install dependencies
25+ - name : Install System Dependencies
2326 run : |
24- sudo apt-get update
25- sudo apt-get install -y librsvg2-bin
26- npm ci
27-
28- - name : Generate app icons
29- run : npm run generate-icons
30-
31- - name : Upload Icons
32- uses : actions/upload-artifact@v4
33- with :
34- name : icons
35- path : |
36- gui/icon.icns
37- gui/icon.ico
38-
39- build :
40- name : Build on ${{ matrix.os }}
41- needs : prepare-assets
42- runs-on : ${{ matrix.os }}
43- strategy :
44- fail-fast : false
45- matrix :
46- os : [macos-latest, windows-latest, ubuntu-latest]
47-
48- steps :
49- - name : Checkout code
50- uses : actions/checkout@v4
51-
52- - name : Setup Node.js
53- uses : actions/setup-node@v4
54- with :
55- node-version : ' 18'
56- cache : ' npm'
27+ brew install librsvg
5728
5829 - name : Install dependencies
5930 run : npm ci
6031
61- - name : Download Icons
62- uses : actions/download-artifact@v4
63- with :
64- name : icons
65- path : gui
66-
6732 - name : Update Version from Tag
68- shell : bash
6933 run : |
70- if [[ $GITHUB_REF_NAME =~ ^v ]]; then
71- VERSION=${GITHUB_REF_NAME#v}
72- echo "Setting package version to $VERSION"
73- npm version $VERSION --no-git-tag-version --allow-same-version
74- fi
34+ VERSION=${GITHUB_REF_NAME#v}
35+ echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
36+ echo "Setting package version to $VERSION"
37+ npm version $VERSION --no-git-tag-version --allow-same-version
7538
7639 - name : Generate SSL certificates
7740 run : npm run generate-cert
7841
79- # Icon generation is done in prepare-assets job
42+ - name : Generate app icons
43+ run : npm run generate-icons
8044
81- # macOS Specific: Apple Certificate Import
8245 - name : Import Apple Developer Certificate
83- if : matrix.os == 'macos-latest'
8446 env :
8547 APPLE_CERTIFICATE : ${{ secrets.APPLE_CERTIFICATE }}
8648 APPLE_CERTIFICATE_PASSWORD : ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
@@ -107,42 +69,13 @@ jobs:
10769 # Clean up certificate file
10870 rm -f certificate.p12
10971
110- - name : Build Application
72+ - name : Build Electron Apps
73+ run : npm run build:all -- -p never
11174 env :
11275 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
11376 APPLE_ID : ${{ secrets.APPLE_ID }}
11477 APPLE_APP_SPECIFIC_PASSWORD : ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
11578 APPLE_TEAM_ID : ${{ secrets.APPLE_TEAM_ID }}
116- shell : bash
117- run : |
118- if [ "${{ matrix.os }}" == "macos-latest" ]; then
119- npm run build:mac -- -p never
120- elif [ "${{ matrix.os }}" == "windows-latest" ]; then
121- npm run build:windows -- -p never
122- elif [ "${{ matrix.os }}" == "ubuntu-latest" ]; then
123- npm run build:linux -- -p never
124- fi
125-
126- - name : Upload Artifacts
127- uses : actions/upload-artifact@v4
128- with :
129- name : app-${{ matrix.os }}
130- path : dist/*.zip
131- if-no-files-found : error
132-
133- release :
134- name : Create Release
135- needs : build
136- runs-on : ubuntu-latest
137- permissions :
138- contents : write
139- steps :
140- - name : Download Artifacts
141- uses : actions/download-artifact@v4
142- with :
143- pattern : app-*
144- merge-multiple : true
145- path : dist
14679
14780 - name : Create Release
14881 uses : softprops/action-gh-release@v1
0 commit comments