1313 - macos
1414 - linux
1515 - windows
16- push :
17- tags :
18- - ' v*'
16+ release :
17+ types : [published]
1918
2019permissions :
2120 contents : write
@@ -27,7 +26,9 @@ concurrency:
2726jobs :
2827 build-macos :
2928 name : Build macOS (ARM64)
30- if : inputs.platform == 'all' || inputs.platform == 'macos' || inputs.platform == ''
29+ if : >
30+ github.event_name == 'release' ||
31+ inputs.platform == 'all' || inputs.platform == 'macos' || inputs.platform == ''
3132 runs-on : [macOS, ARM64]
3233 timeout-minutes : 30
3334
7273 LASTFM_API_KEY : ${{ secrets.LASTFM_API_KEY }}
7374 LASTFM_API_SECRET : ${{ secrets.LASTFM_API_SECRET }}
7475 with :
75- tagName : v__VERSION__
76- releaseName : ' mt v__VERSION__'
77- releaseBody : ' See assets below to download and install.'
78- releaseDraft : true
79- prerelease : false
76+ tagName : ${{ github.event.release.tag_name }}
77+ releaseId : ${{ github.event.release.id }}
8078 args : --target aarch64-apple-darwin
8179 projectPath : ' ./crates/mt-tauri'
8280
8886
8987 build-linux-amd64 :
9088 name : Build Linux (amd64)
91- if : inputs.platform == 'all' || inputs.platform == 'linux' || inputs.platform == ''
89+ if : >
90+ github.event_name == 'release' ||
91+ inputs.platform == 'all' || inputs.platform == 'linux' || inputs.platform == ''
9292 runs-on : ubuntu-latest
9393 timeout-minutes : 30
9494
@@ -104,17 +104,54 @@ jobs:
104104 LASTFM_API_KEY : ${{ secrets.LASTFM_API_KEY }}
105105 LASTFM_API_SECRET : ${{ secrets.LASTFM_API_SECRET }}
106106 with :
107- tagName : v__VERSION__
108- releaseName : ' mt v__VERSION__'
109- releaseBody : ' See assets below to download and install.'
110- releaseDraft : true
111- prerelease : false
107+ tagName : ${{ github.event.release.tag_name }}
108+ releaseId : ${{ github.event.release.id }}
112109 args : --target x86_64-unknown-linux-gnu --bundles deb
113110 projectPath : ' ./crates/mt-tauri'
114111
112+ build-linux-arm64 :
113+ name : Build Linux (ARM64)
114+ if : >
115+ github.event_name == 'release' ||
116+ inputs.platform == 'all' || inputs.platform == 'linux' || inputs.platform == ''
117+ runs-on : ubuntu-latest
118+ timeout-minutes : 60
119+
120+ steps :
121+ - uses : actions/checkout@v6
122+
123+ - name : Set up Docker Buildx
124+ uses : docker/setup-buildx-action@v3
125+
126+ - name : Set up QEMU
127+ uses : docker/setup-qemu-action@v3
128+ with :
129+ platforms : arm64
130+
131+ - name : Build ARM64 .deb
132+ run : |
133+ docker buildx build \
134+ --platform linux/arm64 \
135+ --file docker/Dockerfile.linux-arm64 \
136+ --build-arg LASTFM_API_KEY=${{ secrets.LASTFM_API_KEY }} \
137+ --build-arg LASTFM_API_SECRET=${{ secrets.LASTFM_API_SECRET }} \
138+ --target artifacts \
139+ --output type=local,dest=dist/linux-arm64 \
140+ .
141+
142+ - name : Upload ARM64 artifacts to release
143+ if : github.event_name == 'release'
144+ env :
145+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
146+ run : |
147+ gh release upload "${{ github.event.release.tag_name }}" \
148+ dist/linux-arm64/*.deb
149+
115150 build-windows :
116151 name : Build Windows (x64)
117- if : inputs.platform == 'all' || inputs.platform == 'windows' || inputs.platform == ''
152+ if : >
153+ github.event_name == 'release' ||
154+ inputs.platform == 'all' || inputs.platform == 'windows' || inputs.platform == ''
118155 runs-on : [self-hosted, Windows, X64]
119156 timeout-minutes : 45
120157
@@ -178,11 +215,8 @@ jobs:
178215 LASTFM_API_KEY : ${{ secrets.LASTFM_API_KEY }}
179216 LASTFM_API_SECRET : ${{ secrets.LASTFM_API_SECRET }}
180217 with :
181- tagName : v__VERSION__
182- releaseName : ' mt v__VERSION__'
183- releaseBody : ' See assets below to download and install.'
184- releaseDraft : true
185- prerelease : false
218+ tagName : ${{ github.event.release.tag_name }}
219+ releaseId : ${{ github.event.release.id }}
186220 args : --target x86_64-pc-windows-msvc --bundles nsis --config "${{ env.SIGN_CONFIG_PATH }}"
187221 projectPath : ' ./crates/mt-tauri'
188222
0 commit comments