Skip to content

Commit 1997aed

Browse files
authored
fix: correct macos build (flameshot-org#3867)
- add arm64 build - update x86_64 build on maocos-13
1 parent 3b5459f commit 1997aed

File tree

1 file changed

+38
-5
lines changed

1 file changed

+38
-5
lines changed

.github/workflows/MacOS-pack.yml

Lines changed: 38 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,21 @@ env:
2020
PRODUCT: flameshot
2121

2222
jobs:
23-
x86_64:
24-
name: macOS Sonoma 14
25-
runs-on: macos-14
26-
23+
dmg-pack:
24+
name: Build dmg on ${{ matrix.dist.os }} ${{ matrix.dist.arch }}
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
dist:
29+
- {
30+
os: macos-13,
31+
arch: x86_64
32+
}
33+
- {
34+
os: macos-14,
35+
arch: arm64
36+
}
37+
runs-on: ${{ matrix.dist.os }}
2738
env:
2839
APP_NAME: flameshot
2940
DIR_BULD: build
@@ -46,6 +57,28 @@ jobs:
4657
NOTARIZATION_CHECK: false
4758

4859
steps:
60+
- name: Check architecture
61+
if: matrix.dist.arch == 'x86_64'
62+
shell: bash
63+
run: |
64+
platform_arch=$(uname -m)
65+
if [[ $platform_arch != "x86_64" ]]; then
66+
echo "$platform_arch detected. This build must be run on x86_64."
67+
exit -1
68+
fi
69+
echo "$platform_arch detected."
70+
71+
- name: Check architecture
72+
if: matrix.dist.arch == 'arm64'
73+
shell: bash
74+
run: |
75+
platform_arch=$(uname -m)
76+
if [[ $platform_arch != "arm64" ]]; then
77+
echo "$platform_arch detected. This build must be run on arm64."
78+
exit -1
79+
fi
80+
echo "$platform_arch detected."
81+
4982
- name: Checkout Source code
5083
uses: actions/checkout@v4
5184

@@ -87,7 +120,7 @@ jobs:
87120
- name: Artifact Upload
88121
uses: actions/upload-artifact@v4
89122
with:
90-
name: ${{ env.PRODUCT }}-${{ env.VER_INFO }}-artifact-macos-x86_64
123+
name: ${{ env.PRODUCT }}-${{ env.VER_INFO }}-artifact-macos-${{ matrix.dist.arch }}
91124
path: ${{ github.workspace }}/build/src/flameshot.dmg
92125
overwrite: true
93126

0 commit comments

Comments
 (0)