Skip to content

Commit be317c1

Browse files
authored
chore: build an amd64 asset for x86, upload to shared-services bucket (#2492)
Building mostly for internal use
1 parent 63949ca commit be317c1

2 files changed

Lines changed: 23 additions & 4 deletions

File tree

.github/workflows/release.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,15 @@ jobs:
190190
FULL_NOTES=$(printf "%s\n\n%s\n" "$EXISTING_NOTES" "$CHECKSUM_CONTENT")
191191
GH_TOKEN='${{ github.token }}' gh release edit $RELEASE_NAME -n "$FULL_NOTES"
192192
193-
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
193+
GH_TOKEN='${{ github.token }}' gh release upload $RELEASE_NAME \
194+
./auth-v$RELEASE_VERSION-x86.tar.gz \
195+
./auth-v$RELEASE_VERSION-arm64.tar.gz \
196+
./auth-v$RELEASE_VERSION-darwin-arm64.tar.gz \
197+
./auth-v$RELEASE_VERSION-amd64.tar.xz \
198+
./auth-v$RELEASE_VERSION-arm64.tar.xz
194199
195200
# Upload to Supabase internal bucket
201+
aws s3 cp ./auth-v$RELEASE_VERSION-amd64.tar.xz s3://supabase-internal-artifacts/auth/$RELEASE_VERSION/
196202
aws s3 cp ./auth-v$RELEASE_VERSION-arm64.tar.xz s3://supabase-internal-artifacts/auth/$RELEASE_VERSION/
197203
198204
publish:

Makefile

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,12 @@ BUILD_CMD = go build \
2323
-buildvcs=false \
2424
-ldflags "$(BUILD_LD_FLAGS)$(2)"
2525

26-
RELEASE_TARGETS = x86 arm64 darwin-arm64 arm64-strip
26+
RELEASE_TARGETS = x86 arm64 darwin-arm64 amd64-strip arm64-strip
2727
RELEASE_ARCHIVES = \
2828
auth-$(VERSION)-x86.tar.gz \
2929
auth-$(VERSION)-arm64.tar.gz \
3030
auth-$(VERSION)-darwin-arm64.tar.gz \
31+
auth-$(VERSION)-amd64.tar.xz \
3132
auth-$(VERSION)-arm64.tar.xz
3233

3334

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

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

39-
build: auth auth-arm64 auth-darwin-arm64 ## Build the binaries.
40+
build: auth auth-amd64 auth-arm64 auth-darwin-arm64 ## Build the binaries.
4041

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

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

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

50+
auth-amd64: deps
51+
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(call BUILD_CMD,$(@),)
52+
4953
auth-arm64: deps
5054
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 $(call BUILD_CMD,$(@),)
5155

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

59+
auth-amd64-strip: deps
60+
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(call BUILD_CMD,$(@), -s)
61+
5562
auth-arm64-strip: deps
5663
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 $(call BUILD_CMD,$(@), -s)
5764

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

83+
auth-$(VERSION)-amd64.tar.xz: \
84+
release-amd64-strip/auth \
85+
release-amd64-strip/gotrue | migrations
86+
tar -C $(<D) -cf - auth gotrue -C ../ migrations/ \
87+
| xz -T0 -9e -C crc64 > $(@)
88+
7689
auth-$(VERSION)-arm64.tar.xz: \
7790
release-arm64-strip/auth \
7891
release-arm64-strip/gotrue | migrations

0 commit comments

Comments
 (0)