Skip to content

Commit e04c125

Browse files
authored
Merge pull request #37 from inloco/feat/build-darwin-arm64
Build macOS arm64 binaries
2 parents e3c6082 + e2716a6 commit e04c125

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

.github/workflows/main.yaml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ jobs:
88
platform:
99
- macos-latest
1010
- ubuntu-latest
11+
goarch:
12+
- amd64
13+
- arm64
14+
exclude:
15+
- platform: ubuntu-latest
16+
goarch: arm64
1117
runs-on: ${{ matrix.platform }}
1218
steps:
1319
- name: Set up Go 1.24
@@ -18,11 +24,13 @@ jobs:
1824
- name: Check out code into the Go module directory
1925
uses: actions/[email protected]
2026
- name: Make
27+
env:
28+
GOARCH: ${{ matrix.goarch }}
2129
run: make continuous-integration
2230
- name: Upload artifact
2331
uses: actions/upload-artifact@v4
2432
with:
25-
name: ${{ runner.os }}
33+
name: ${{ runner.os }}-${{ matrix.goarch }}
2634
path: plugin
2735
release:
2836
name: Release
@@ -53,21 +61,26 @@ jobs:
5361
os:
5462
- name: macOS
5563
kernel: darwin
64+
goarch: amd64
65+
- name: macOS
66+
kernel: darwin
67+
goarch: arm64
5668
- name: Linux
5769
kernel: linux
70+
goarch: amd64
5871
steps:
59-
- name: Download ${{ matrix.os.name }} Artifact
72+
- name: Download ${{ matrix.os.name }}-${{ matrix.os.goarch }} Artifact
6073
uses: actions/download-artifact@v4
6174
with:
62-
name: ${{ matrix.os.name }}
75+
name: ${{ matrix.os.name }}-${{ matrix.os.goarch }}
6376
- name: Upload ${{ matrix.os.name }} Release Asset
6477
uses: actions/[email protected]
6578
env:
6679
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6780
with:
6881
upload_url: ${{ needs.release.outputs.upload-url }}
6982
asset_path: ./plugin
70-
asset_name: plugin-${{ matrix.os.kernel }}-amd64
83+
asset_name: plugin-${{ matrix.os.kernel }}-${{ matrix.os.goarch }}
7184
asset_content_type: application/octet-stream
7285
publish-script:
7386
name: Publish Script

0 commit comments

Comments
 (0)