From 7de6bfbe1a8b6896b4135c29afc7437db4f9e996 Mon Sep 17 00:00:00 2001 From: Stojan Dimitrovski Date: Wed, 20 Nov 2024 12:18:21 +0100 Subject: [PATCH] ci: upload release artifact to supabase s3 bucket (#1812) Uploads the release artifact to a Supabase owned S3 bucket for easy releases. --- .github/workflows/release.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9d50be07a..3617dadfc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -90,6 +90,12 @@ jobs: mv auth-arm64 auth tar -czvf auth-v$RELEASE_VERSION-arm64.tar.gz auth gotrue migrations/ + - name: configure aws credentials for uploading release artifacts + uses: aws-actions/configure-aws-credentials@v1 + with: + role-to-assume: ${{ secrets.PROD_AWS_ROLE }} + aws-region: us-east-1 + - name: Upload release artifacts if: ${{ steps.release.outputs.release_created == 'true' || steps.release.outputs.prs_created == 'true' }} run: | @@ -126,6 +132,8 @@ jobs: -f "sha=$GITHUB_SHA" fi fi + + aws s3api put-object --bucket ${{ secrets.PROD_ARTIFACTS_BUCKET }} --key auth-v$RELEASE_VERSION-arm64.tar.gz --body ./auth-v$RELEASE_VERSION-arm64.tar.gz fi GH_TOKEN='${{ github.token }}' gh release upload $RELEASE_NAME ./auth-v$RELEASE_VERSION-x86.tar.gz ./auth-v$RELEASE_VERSION-arm64.tar.gz