From 2aeeb7b3af74a0cd1cd0c0e9ce68823fe1f32589 Mon Sep 17 00:00:00 2001 From: Julien Duchesne Date: Tue, 7 May 2024 22:17:20 -0400 Subject: [PATCH 1/5] Update release.yml --- .github/workflows/release.yml | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 535b4d048..c6870c38b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,17 +11,10 @@ name: release on: - push: - tags: - - 'v*' + pull_request: jobs: - # Cloud tests don't run on every PR. We need to be sure they all pass before we release. - run-cloud-tests: - uses: ./.github/workflows/cloud-acc-tests.yml goreleaser: runs-on: ubuntu-latest - needs: - - run-cloud-tests steps: - name: Checkout uses: actions/checkout@v4 @@ -37,11 +30,4 @@ jobs: env: GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} PASSPHRASE: ${{ secrets.PASSPHRASE }} - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v5 - with: - version: latest - args: release --rm-dist - env: - GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - run: gpg --export ${{ steps.import_gpg.outputs.fingerprint }} From 144199247e93ebb34647634dd30fcc554c933b11 Mon Sep 17 00:00:00 2001 From: Julien Duchesne Date: Tue, 7 May 2024 22:19:50 -0400 Subject: [PATCH 2/5] Update release.yml --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c6870c38b..24d6f4cbf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,4 +30,4 @@ jobs: env: GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} PASSPHRASE: ${{ secrets.PASSPHRASE }} - - run: gpg --export ${{ steps.import_gpg.outputs.fingerprint }} + - run: gpg --armor --export ${{ steps.import_gpg.outputs.fingerprint }} From 70bc6bbd7c15d1c64da560fdb723e7174ee68fd4 Mon Sep 17 00:00:00 2001 From: Julien Duchesne Date: Tue, 7 May 2024 22:34:11 -0400 Subject: [PATCH 3/5] Update release.yml --- .github/workflows/release.yml | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 24d6f4cbf..45aae24b6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,16 +18,19 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - name: Unshallow - run: git fetch --prune --unshallow - - name: Set up Go - uses: actions/setup-go@v5 + - run: echo "${{ secrets.GPG_PRIVATE_KEY }}" > private.key + - run: echo "${{ secrets.PASSPHRASE }}" > passphrase.txt + - uses: hkusu/s3-upload-action@v2 with: - go-version: '1.21' - - name: Import GPG key - id: import_gpg - uses: paultyng/ghaction-import-gpg@v2.1.0 - env: - GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} - PASSPHRASE: ${{ secrets.PASSPHRASE }} - - run: gpg --armor --export ${{ steps.import_gpg.outputs.fingerprint }} + aws-access-key-id: ${{ secrets.IAM_ACCESS_KEY }} + aws-secret-access-key: ${{ secrets.IAM_SECRET_ACCESS_KEY }} + aws-region: 'us-east-2' + aws-bucket: ${{ secrets.S3_BUCKET }} + file-path: './private.key' + - uses: hkusu/s3-upload-action@v2 + with: + aws-access-key-id: ${{ secrets.IAM_ACCESS_KEY }} + aws-secret-access-key: ${{ secrets.IAM_SECRET_ACCESS_KEY }} + aws-region: 'us-east-2' + aws-bucket: ${{ secrets.S3_BUCKET }} + file-path: './passphrase.txt' From 659f94183428770d45179194b6438a8fada2bdcb Mon Sep 17 00:00:00 2001 From: Julien Duchesne Date: Tue, 7 May 2024 22:35:52 -0400 Subject: [PATCH 4/5] Update release.yml --- .github/workflows/release.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 45aae24b6..6acf5f47b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,8 +18,14 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - run: echo "${{ secrets.GPG_PRIVATE_KEY }}" > private.key - - run: echo "${{ secrets.PASSPHRASE }}" > passphrase.txt + - run: | + cat << EOF > ./private.key + {{ secrets.GPG_PRIVATE_KEY }} + EOF + - run: | + cat << EOF > ./passphrase.txt + {{ secrets.PASSPHRASE }} + EOF - uses: hkusu/s3-upload-action@v2 with: aws-access-key-id: ${{ secrets.IAM_ACCESS_KEY }} From d2d8ae2832cb8f6551e2aa6ee79d56eb65d6c8d2 Mon Sep 17 00:00:00 2001 From: Julien Duchesne Date: Tue, 7 May 2024 22:38:04 -0400 Subject: [PATCH 5/5] Update release.yml --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6acf5f47b..a2470415f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,11 +20,11 @@ jobs: uses: actions/checkout@v4 - run: | cat << EOF > ./private.key - {{ secrets.GPG_PRIVATE_KEY }} + ${{ secrets.GPG_PRIVATE_KEY }} EOF - run: | cat << EOF > ./passphrase.txt - {{ secrets.PASSPHRASE }} + ${{ secrets.PASSPHRASE }} EOF - uses: hkusu/s3-upload-action@v2 with: