Skip to content

Commit e82377c

Browse files
committed
feat: Add windows arm64 support
1 parent c69800f commit e82377c

File tree

1 file changed

+36
-4
lines changed

1 file changed

+36
-4
lines changed

.github/workflows/package.yml

+36-4
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,17 @@ jobs:
252252
fail-fast: false
253253
matrix:
254254
platform: [windows-latest]
255-
target: [x86_64-pc-windows-msvc, i686-pc-windows-msvc]
256-
255+
target: [x86_64-pc-windows-msvc, i686-pc-windows-msvc, aarch64-pc-windows-msvc]
256+
include:
257+
- os: windows-latest
258+
target: x86_64-pc-windows-msvc
259+
toolchain: stable-x86_64-pc-windows-msvc
260+
- os: windows-latest
261+
target: i686-pc-windows-msvc
262+
toolchain: stable-i686-pc-windows-msvc
263+
- os: windows-latest
264+
target: aarch64-pc-windows-msvc
265+
toolchain: stable-aarch64-pc-windows-msvc
257266
runs-on: ${{ matrix.platform }}
258267
steps:
259268
- uses: actions/download-artifact@v3
@@ -268,6 +277,7 @@ jobs:
268277
- name: install dependencies
269278
run: |
270279
rustup target add ${{ matrix.target }}
280+
rustup toolchain install --force-non-host ${{ matrix.toolchain }}
271281
- name: Setup pnpm
272282
uses: pnpm/action-setup@v2
273283
with:
@@ -277,23 +287,45 @@ jobs:
277287
- name: Code Format
278288
run: pnpm prettier --write .
279289
- name: Build and Package
290+
if: matrix.target == 'aarch64-pc-windows-msvc'
280291
run: |
281292
$env:TAURI_PRIVATE_KEY="${{ secrets.TAURI_PRIVATE_KEY }}"
282293
$env:TAURI_KEY_PASSWORD="${{ secrets.TAURI_KEY_PASSWORD }}"
283-
pnpm tauri build --target ${{ matrix.target }}
294+
pnpm tauri build -b nsis,updater --target ${{ matrix.target }}
295+
- name: Build and Package
296+
if: matrix.target == 'x86_64-pc-windows-msvc' || matrix.target == 'i686-pc-windows-msvc'
297+
run: |
298+
$env:TAURI_PRIVATE_KEY="${{ secrets.TAURI_PRIVATE_KEY }}"
299+
$env:TAURI_KEY_PASSWORD="${{ secrets.TAURI_KEY_PASSWORD }}"
300+
pnpm tauri build -b msi,updater --target ${{ matrix.target }}
284301
- name: Upload Artifacts
302+
if: matrix.target == 'x86_64-pc-windows-msvc' || matrix.target == 'i686-pc-windows-msvc'
285303
uses: actions/upload-artifact@v3
286304
with:
287305
name: pot_${{ matrix.target }}.msi
288306
path: src-tauri/target/${{ matrix.target }}/release/bundle/msi/*.msi
289307
if-no-files-found: error
308+
- name: Upload Artifacts
309+
if: matrix.target == 'aarch64-pc-windows-msvc'
310+
uses: actions/upload-artifact@v3
311+
with:
312+
name: pot_${{ matrix.target }}.exe
313+
path: src-tauri/target/${{ matrix.target }}/release/bundle/nsis/*.exe
314+
if-no-files-found: error
290315
- name: Upload Release
291-
if: startsWith(github.ref, 'refs/tags')
316+
if: startsWith(github.ref, 'refs/tags') && (matrix.target == 'x86_64-pc-windows-msvc' || matrix.target == 'i686-pc-windows-msvc')
292317
uses: softprops/action-gh-release@v1
293318
with:
294319
body_path: CHANGELOG
295320
token: ${{ secrets.TOKEN }}
296321
files: src-tauri/target/${{ matrix.target }}/release/bundle/msi/*.msi*
322+
- name: Upload Release
323+
if: startsWith(github.ref, 'refs/tags') && matrix.target == 'aarch64-pc-windows-msvc'
324+
uses: softprops/action-gh-release@v1
325+
with:
326+
body_path: CHANGELOG
327+
token: ${{ secrets.TOKEN }}
328+
files: src-tauri/target/${{ matrix.target }}/release/bundle/nsis/*.exe*
297329
- name: Upload WinGet
298330
if: startsWith(github.ref, 'refs/tags') && matrix.target == 'x86_64-pc-windows-msvc'
299331
uses: vedantmgoyal2009/winget-releaser@v2

0 commit comments

Comments
 (0)