Skip to content

Commit 4b00bfa

Browse files
committed
Add architecture matrix support in build workflow and rename artifacts accordingly
1 parent fef8192 commit 4b00bfa

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

.github/workflows/build.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ permissions:
1212
jobs:
1313
release:
1414
runs-on: macos-latest
15+
strategy:
16+
matrix:
17+
arch: [x64, arm64]
1518

1619
steps:
1720
- name: Check out Git repository
@@ -60,7 +63,21 @@ jobs:
6063
APPLE_ID: ${{ secrets.APPLE_ID }}
6164
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
6265
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
63-
run: pnpm run make
66+
ARCH: ${{ matrix.arch }}
67+
run: pnpm run make -- --arch=${{ matrix.arch }}
68+
69+
- name: Rename artifacts for architecture
70+
run: |
71+
cd out
72+
for f in **/*.zip; do
73+
if [ -f "$f" ]; then
74+
directory=$(dirname "$f")
75+
filename=$(basename "$f")
76+
extension="${filename##*.}"
77+
filename="${filename%.*}"
78+
mv "$f" "$directory/${filename}-${{ matrix.arch }}.${extension}"
79+
fi
80+
done
6481
6582
- name: Create Release
6683
uses: softprops/action-gh-release@v1

0 commit comments

Comments
 (0)