diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 535b4d048..a2470415f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,37 +11,32 @@ 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 - - name: Unshallow - run: git fetch --prune --unshallow - - name: Set up Go - uses: actions/setup-go@v5 + - 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: - 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 }} - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v5 + 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: - version: latest - args: release --rm-dist - env: - GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + 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'