Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,15 @@ jobs:
FULL_NOTES=$(printf "%s\n\n%s\n" "$EXISTING_NOTES" "$CHECKSUM_CONTENT")
GH_TOKEN='${{ github.token }}' gh release edit $RELEASE_NAME -n "$FULL_NOTES"

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
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-darwin-arm64.tar.gz \
./auth-v$RELEASE_VERSION-amd64.tar.xz \
./auth-v$RELEASE_VERSION-arm64.tar.xz

# Upload to Supabase internal bucket
aws s3 cp ./auth-v$RELEASE_VERSION-amd64.tar.xz s3://supabase-internal-artifacts/auth/$RELEASE_VERSION/
aws s3 cp ./auth-v$RELEASE_VERSION-arm64.tar.xz s3://supabase-internal-artifacts/auth/$RELEASE_VERSION/

publish:
Expand Down
19 changes: 16 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ BUILD_CMD = go build \
-buildvcs=false \
-ldflags "$(BUILD_LD_FLAGS)$(2)"

RELEASE_TARGETS = x86 arm64 darwin-arm64 arm64-strip
RELEASE_TARGETS = x86 arm64 darwin-arm64 amd64-strip arm64-strip
RELEASE_ARCHIVES = \
auth-$(VERSION)-x86.tar.gz \
auth-$(VERSION)-arm64.tar.gz \
auth-$(VERSION)-darwin-arm64.tar.gz \
auth-$(VERSION)-amd64.tar.xz \
auth-$(VERSION)-arm64.tar.xz


Expand All @@ -36,22 +37,28 @@ help: ## Show this help.

all: vet sec static build ## Run the tests and build the binary.

build: auth auth-arm64 auth-darwin-arm64 ## Build the binaries.
build: auth auth-amd64 auth-arm64 auth-darwin-arm64 ## Build the binaries.

build-strip: auth-arm64-strip ## Build a stripped binary, for which the version file needs to be rewritten.
build-strip: auth-amd64-strip auth-arm64-strip ## Build a stripped binary, for which the version file needs to be rewritten.

auth: deps
CGO_ENABLED=0 $(call BUILD_CMD,$(@),)

auth-x86: deps
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(call BUILD_CMD,$(@),)

auth-amd64: deps
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(call BUILD_CMD,$(@),)

auth-arm64: deps
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 $(call BUILD_CMD,$(@),)

auth-darwin-arm64: deps
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 $(call BUILD_CMD,$(@),)

auth-amd64-strip: deps
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(call BUILD_CMD,$(@), -s)

auth-arm64-strip: deps
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 $(call BUILD_CMD,$(@), -s)

Expand All @@ -73,6 +80,12 @@ auth-$(VERSION)-%.tar.gz: \
release-%/gotrue | migrations
tar -C $(<D) -czvf $(@) auth gotrue -C ../ migrations/

auth-$(VERSION)-amd64.tar.xz: \
release-amd64-strip/auth \
release-amd64-strip/gotrue | migrations
tar -C $(<D) -cf - auth gotrue -C ../ migrations/ \
| xz -T0 -9e -C crc64 > $(@)

auth-$(VERSION)-arm64.tar.xz: \
release-arm64-strip/auth \
release-arm64-strip/gotrue | migrations
Expand Down
Loading