diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f355ce2d..d6e48a9a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,35 +1,38 @@ -name: Release +name: release on: push: tags: - 'v*' jobs: goreleaser: - name: Run relase runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Set up Go + - + name: Checkout + uses: actions/checkout@v2.3.4 + - + name: Unshallow + run: git fetch --prune --unshallow + - + name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.15 - - - name: Import GPG key + go-version: 1.14 + - + name: Import GPG key id: import_gpg - uses: crazy-max/ghaction-import-gpg@v3 - with: - gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} - passphrase: ${{ secrets.PASSPHRASE }} - - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v2 + uses: hashicorp/ghaction-import-gpg@v2.1.0 + env: + # These secrets will need to be configured for the repository: + GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} + PASSPHRASE: ${{ secrets.PASSPHRASE }} + - + name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2.7.0 with: version: latest args: release --rm-dist env: GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} + # GitHub sets this automatically GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}