Skip to content

Commit 285ca22

Browse files
committed
feat: add arm mac support
1 parent f94a602 commit 285ca22

6 files changed

Lines changed: 46 additions & 10 deletions

File tree

.github/workflows/test-determine-binary-name.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,14 @@ jobs:
1414
expected-name: my-binary.exe
1515
expected-name-with-arch: my-binary-x86_64-pc-windows-msvc.exe
1616
expected-suffix: x86_64-pc-windows-msvc
17-
- image: macos-latest
17+
- image: macos-26-intel
1818
expected-name: my-binary
1919
expected-name-with-arch: my-binary-x86_64-apple-darwin
2020
expected-suffix: x86_64-apple-darwin
21+
- image: macos-26
22+
expected-name: my-binary
23+
expected-name-with-arch: my-binary-aarch64-apple-darwin
24+
expected-suffix: aarch64-apple-darwin
2125
runs-on: ${{ matrix.os.image }}
2226
steps:
2327
- uses: actions/checkout@v6
@@ -54,10 +58,14 @@ jobs:
5458
expected-name: program.exe
5559
expected-name-with-arch: program-windows.exe
5660
expected-suffix: windows
57-
- image: macos-latest
61+
- image: macos-26-intel
5862
expected-name: program
5963
expected-name-with-arch: program-macos
6064
expected-suffix: macos
65+
- image: macos-26
66+
expected-name: program
67+
expected-name-with-arch: program-macos-arm
68+
expected-suffix: macos-arm
6169
runs-on: ${{ matrix.os.image }}
6270
steps:
6371
- uses: actions/checkout@v6
@@ -68,6 +76,7 @@ jobs:
6876
linux-suffix: linux
6977
windows-suffix: windows
7078
macos-suffix: macos
79+
macos-arm-suffix: macos-arm
7180
- uses: armakuni/github-actions/assert-equals@v0.19.14
7281
name: Check name
7382
with:

.github/workflows/test-determine-release-url.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ jobs:
1010
expected-url: https://github.com/example-org/example-app/releases/latest/download/my-binary-x86_64-unknown-linux-gnu
1111
- image: windows-latest
1212
expected-url: https://github.com/example-org/example-app/releases/latest/download/my-binary-x86_64-pc-windows-msvc.exe
13-
- image: macos-latest
13+
- image: macos-26-intel
1414
expected-url: https://github.com/example-org/example-app/releases/latest/download/my-binary-x86_64-apple-darwin
15+
- image: macos-26
16+
expected-url: https://github.com/example-org/example-app/releases/latest/download/my-binary-aarch64-apple-darwin
1517
runs-on: ${{ matrix.os.image }}
1618
steps:
1719
- uses: actions/checkout@v6
@@ -35,8 +37,10 @@ jobs:
3537
expected-url: https://github.com/demo-org/demo-app/releases/latest/download/program-linux
3638
- image: windows-latest
3739
expected-url: https://github.com/demo-org/demo-app/releases/latest/download/program-windows.exe
38-
- image: macos-latest
40+
- image: macos-26-intel
3941
expected-url: https://github.com/demo-org/demo-app/releases/latest/download/program-macos
42+
- image: macos-26
43+
expected-url: https://github.com/demo-app/demo-org/releases/latest/download/program-macos-arm
4044
runs-on: ${{ matrix.os.image }}
4145
steps:
4246
- uses: actions/checkout@v6
@@ -49,6 +53,7 @@ jobs:
4953
linux-suffix: linux
5054
windows-suffix: windows
5155
macos-suffix: macos
56+
macos-arm-suffix: macos-arm
5257
- uses: armakuni/github-actions/assert-equals@v0.19.14
5358
name: Check url
5459
with:

.github/workflows/test-install-release-binary.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ jobs:
88
os:
99
- ubuntu-latest
1010
- windows-latest
11-
- macos-latest
11+
- macos-26-intel
12+
- macos-26
1213
runs-on: ${{ matrix.os }}
1314
steps:
1415
- uses: actions/checkout@v6
@@ -26,7 +27,8 @@ jobs:
2627
os:
2728
- ubuntu-latest
2829
- windows-latest
29-
- macos-latest
30+
- macos-26-intel
31+
- macos-26
3032
runs-on: ${{ matrix.os }}
3133
steps:
3234
- uses: actions/checkout@v6

determine-binary-name/action.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,13 @@ inputs:
1414
required: false
1515
default: x86_64-unknown-linux-gnu
1616
macos-suffix:
17-
description: The suffix to add to Linux binaries
17+
description: The suffix to add to macOS binaries
1818
required: false
1919
default: x86_64-apple-darwin
20+
macos-arm-suffix:
21+
description: The suffix to add to macOS ARM binaries
22+
required: false
23+
default: aarch64-apple-darwin
2024

2125
outputs:
2226
name:
@@ -39,6 +43,7 @@ runs:
3943
WINDOWS_SUFFIX: ${{ inputs.windows-suffix }}
4044
LINUX_SUFFIX: ${{ inputs.linux-suffix }}
4145
MACOS_SUFFIX: ${{ inputs.macos-suffix }}
46+
MACOS_ARM_SUFFIX: ${{ inputs.macos-arm-suffix }}
4247
run: |
4348
set -euo pipefail
4449
@@ -51,7 +56,11 @@ runs:
5156
target_file="$FILENAME.exe"
5257
source_file="$FILENAME-$suffix.exe"
5358
elif [ "$RUNNER_OS" == "macOS" ]; then
54-
suffix="$MACOS_SUFFIX"
59+
if [ "$(uname -m)" == "arm64" ]; then
60+
suffix="$MACOS_ARM_SUFFIX"
61+
else
62+
suffix="$MACOS_SUFFIX"
63+
fi
5564
target_file="$FILENAME"
5665
source_file="$FILENAME-$suffix"
5766
else

determine-release-url/action.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,13 @@ inputs:
2020
required: false
2121
default: x86_64-unknown-linux-gnu
2222
macos-suffix:
23-
description: The suffix to add to Linux binaries
23+
description: The suffix to add to macOS binaries
2424
required: false
2525
default: x86_64-apple-darwin
26+
macos-arm-suffix:
27+
description: The suffix to add to macOS ARM binaries
28+
required: false
29+
default: aarch64-apple-darwin
2630
version:
2731
description: The required release version
2832
required: false
@@ -44,6 +48,7 @@ runs:
4448
windows-suffix: ${{ inputs.windows-suffix }}
4549
linux-suffix: ${{ inputs.linux-suffix }}
4650
macos-suffix: ${{ inputs.macos-suffix }}
51+
macos-arm-suffix: ${{ inputs.macos-arm-suffix }}
4752

4853
- name: Determine Release Base URL
4954
id: get-base-url

install-release-binary/action.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,13 @@ inputs:
2020
required: false
2121
default: x86_64-unknown-linux-gnu
2222
macos-suffix:
23-
description: The suffix to add to Linux binaries
23+
description: The suffix to add to macOS binaries
2424
required: false
2525
default: x86_64-apple-darwin
26+
macos-arm-suffix:
27+
description: The suffix to add to macOS ARM binaries
28+
required: false
29+
default: aarch64-apple-darwin
2630
version:
2731
description: The required release version
2832
required: false
@@ -39,6 +43,7 @@ runs:
3943
windows-suffix: ${{ inputs.windows-suffix }}
4044
linux-suffix: ${{ inputs.linux-suffix }}
4145
macos-suffix: ${{ inputs.macos-suffix }}
46+
macos-arm-suffix: ${{ inputs.macos-arm-suffix }}
4247

4348
- name: Determine Release URL
4449
id: get-release-url
@@ -51,6 +56,7 @@ runs:
5156
windows-suffix: ${{ inputs.windows-suffix }}
5257
linux-suffix: ${{ inputs.linux-suffix }}
5358
macos-suffix: ${{ inputs.macos-suffix }}
59+
macos-arm-suffix: ${{ inputs.macos-arm-suffix }}
5460

5561
- name: Install Binary
5662
id: install

0 commit comments

Comments
 (0)