From a1f38d7ec28cde957eded3eb213e62a4cf63f4c3 Mon Sep 17 00:00:00 2001 From: Dustin Martin Date: Mon, 12 Feb 2024 13:07:17 -0500 Subject: [PATCH] Use macOS ARM runner instead of cross-compiling --- .github/workflows/release.yml | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f723e17..a0f64ee 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -47,11 +47,9 @@ jobs: strategy: matrix: os: - - ubuntu-latest - - macos-latest - arch: - - amd64 - - arm64 + - ubuntu-latest # amd64 + - macos-13 # amd64 + - macos-14 # arm64 steps: - name: Set up Go 1.x uses: actions/setup-go@v2 @@ -60,25 +58,21 @@ jobs: id: go - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - - name: Build project # This would actually build your project, using zip for an example artifact + - name: Build project run: | go get -v -t -d ./... mkdir bin - CGO_ENABLED=1 GOARCH=${arch} go build -v -ldflags "-X github.com/picoCTF/cmgr/cmgr.version=`git describe --tags`" -o bin ./... + CGO_ENABLED=1 go build -v -ldflags "-X github.com/picoCTF/cmgr/cmgr.version=`git describe --tags`" -o bin ./... cp LICENSE bin/LICENSE cat NOTICE NOTICE.release > bin/NOTICE cd bin && tar czvf cmgr.tar.gz cmgr cmgrd LICENSE NOTICE - env: - arch: ${{ matrix.arch }} - name: Get OS/architecture suffix id: suffix run: | - echo "::set-output name=arch_suffix::`go version | cut -d ' ' -f 4,4 | cut -d '/' -f 1,1`_${arch}" - env: - arch: ${{ matrix.arch }} + echo "::set-output name=arch_suffix::`go version | cut -d ' ' -f 4,4 | tr '/' '_'`" - name: Upload Binaries id: upload-binaries