terraform-provider-matrix

git clone git://archive.git.mtrnord.blog/MTRNord/terraform-provider-matrix.git
Log | Files | Refs | README | LICENSE

release.yml (1406B)


      1 # Terraform Provider release workflow.
      2 name: Release
      3 
      4 # This GitHub action creates a release when a tag that matches the pattern
      5 # "v*" (e.g. v0.1.0) is created.
      6 on:
      7   push:
      8     tags:
      9       - 'v*'
     10 
     11 # Releases need permissions to read and write the repository contents.
     12 # GitHub considers creating releases and uploading assets as writing contents.
     13 permissions:
     14   contents: write
     15 
     16 jobs:
     17   goreleaser:
     18     runs-on: ubuntu-latest
     19     steps:
     20       - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
     21         with:
     22           # Allow goreleaser to access older tag information.
     23           fetch-depth: 0
     24       - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
     25         with:
     26           go-version-file: 'go.mod'
     27           cache: true
     28       - name: Import GPG key
     29         uses: crazy-max/ghaction-import-gpg@82a020f1f7f605c65dd2449b392a52c3fcfef7ef # v6.0.0
     30         id: import_gpg
     31         with:
     32           gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
     33           passphrase: ${{ secrets.PASSPHRASE }}
     34       - name: Run GoReleaser
     35         uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 # v5.0.0
     36         with:
     37           args: release --clean
     38         env:
     39           # GitHub sets the GITHUB_TOKEN secret automatically.
     40           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
     41           GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}