Skip to content

Commit a1f38d7

Browse files
committed
Use macOS ARM runner instead of cross-compiling
1 parent 0b95b1d commit a1f38d7

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

.github/workflows/release.yml

+7-13
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,9 @@ jobs:
4747
strategy:
4848
matrix:
4949
os:
50-
- ubuntu-latest
51-
- macos-latest
52-
arch:
53-
- amd64
54-
- arm64
50+
- ubuntu-latest # amd64
51+
- macos-13 # amd64
52+
- macos-14 # arm64
5553
steps:
5654
- name: Set up Go 1.x
5755
uses: actions/setup-go@v2
@@ -60,25 +58,21 @@ jobs:
6058
id: go
6159

6260
- name: Checkout code
63-
uses: actions/checkout@v2
61+
uses: actions/checkout@v4
6462

65-
- name: Build project # This would actually build your project, using zip for an example artifact
63+
- name: Build project
6664
run: |
6765
go get -v -t -d ./...
6866
mkdir bin
69-
CGO_ENABLED=1 GOARCH=${arch} go build -v -ldflags "-X github.com/picoCTF/cmgr/cmgr.version=`git describe --tags`" -o bin ./...
67+
CGO_ENABLED=1 go build -v -ldflags "-X github.com/picoCTF/cmgr/cmgr.version=`git describe --tags`" -o bin ./...
7068
cp LICENSE bin/LICENSE
7169
cat NOTICE NOTICE.release > bin/NOTICE
7270
cd bin && tar czvf cmgr.tar.gz cmgr cmgrd LICENSE NOTICE
73-
env:
74-
arch: ${{ matrix.arch }}
7571
7672
- name: Get OS/architecture suffix
7773
id: suffix
7874
run: |
79-
echo "::set-output name=arch_suffix::`go version | cut -d ' ' -f 4,4 | cut -d '/' -f 1,1`_${arch}"
80-
env:
81-
arch: ${{ matrix.arch }}
75+
echo "::set-output name=arch_suffix::`go version | cut -d ' ' -f 4,4 | tr '/' '_'`"
8276
8377
- name: Upload Binaries
8478
id: upload-binaries

0 commit comments

Comments
 (0)