Skip to content

Commit c0baafd

Browse files
authored
chore: add support for building darwin/arm64 binaries (#2400)
Adds support for building and releasing darwin arm-64 binaries
1 parent 6f0b2eb commit c0baafd

3 files changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ jobs:
107107
mv auth-arm64 auth
108108
tar -czvf auth-v$RELEASE_VERSION-arm64.tar.gz auth gotrue migrations/
109109
110+
mv auth-darwin-arm64 auth
111+
tar -czvf auth-v$RELEASE_VERSION-darwin-arm64.tar.gz auth gotrue migrations/
112+
110113
mv auth-arm64-strip auth
111114
tar -cf - auth gotrue migrations/ | xz -T0 -9e -C crc64 > auth-v$RELEASE_VERSION-arm64.tar.xz
112115
@@ -198,7 +201,7 @@ jobs:
198201
FULL_NOTES=$(printf "%s\n\n%s\n" "$EXISTING_NOTES" "$CHECKSUM_CONTENT")
199202
GH_TOKEN='${{ github.token }}' gh release edit $RELEASE_NAME -n "$FULL_NOTES"
200203
201-
GH_TOKEN='${{ github.token }}' gh release upload $RELEASE_NAME ./auth-v$RELEASE_VERSION-x86.tar.gz ./auth-v$RELEASE_VERSION-arm64.tar.gz ./auth-v$RELEASE_VERSION-arm64.tar.xz
204+
GH_TOKEN='${{ github.token }}' gh release upload $RELEASE_NAME ./auth-v$RELEASE_VERSION-x86.tar.gz ./auth-v$RELEASE_VERSION-arm64.tar.gz ./auth-v$RELEASE_VERSION-arm64.tar.xz ./auth-v$RELEASE_VERSION-darwin-arm64.tar.gz
202205
203206
# Upload to Supabase internal bucket
204207
aws s3 cp ./auth-v$RELEASE_VERSION-arm64.tar.xz s3://supabase-internal-artifacts/auth/$RELEASE_VERSION/

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ gotrue.exe
66
auth
77
auth-arm64
88
auth-arm64-strip
9+
auth-darwin-arm64
910
auth.exe
1011

1112
coverage.out

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ all: vet sec static build ## Run the tests and build the binary.
2626
build: deps ## Build the binary.
2727
CGO_ENABLED=0 go build $(FLAGS)
2828
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build $(FLAGS) -o auth-arm64
29+
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build $(FLAGS) -o auth-darwin-arm64
2930

3031
build-strip: deps ## Build a stripped binary, for which the version file needs to be rewritten.
3132
echo "package utilities" > internal/utilities/version.go

0 commit comments

Comments
 (0)