Skip to content

ci: add goreleaser

ci: add goreleaser #23

Workflow file for this run

---
name: Release
on:
push:
tags: ['v*']
permissions:
contents: write
id-token: write
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ${{ vars.RP_AWS_CRED_REGION }}
role-to-assume: arn:aws:iam::${{ secrets.RP_AWS_CRED_ACCOUNT_ID }}:role/${{ vars.RP_AWS_CRED_BASE_ROLE_NAME }}${{ github.event.repository.name }}
- uses: aws-actions/aws-secretsmanager-get-secrets@v2
with:
secret-ids: |
,sdlc/prod/github/tf_provider_rp
parse-json-secrets: true
- uses: actions/checkout@v4
with:
# Allow goreleaser to access older tag information.
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true
- uses: crazy-max/ghaction-import-gpg@v6
id: import_gpg
with:
gpg_private_key: ${{ env.TF_PROVIDER_RP_GPG_PRIVATE_KEY }}
passphrase: ${{ env.TF_PROVIDER_RP_PASSPHRASE }}
- uses: goreleaser/goreleaser-action@v6
with:
args: release --clean
env:
# GitHub sets the GITHUB_TOKEN secret automatically.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}