diff --git a/.github/workflows/release_build.yml b/.github/workflows/release_build.yml index b2baa16..eb2cd3f 100644 --- a/.github/workflows/release_build.yml +++ b/.github/workflows/release_build.yml @@ -22,6 +22,13 @@ jobs: go-version: 1.17.2 id: go + - name: Import GPG key + id: import_gpg + uses: crazy-max/ghaction-import-gpg@v4 + with: + gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} + passphrase: ${{ secrets.GPG_PASSPHRASE }} + - name: Run GoReleaser uses: goreleaser/goreleaser-action@master with: @@ -29,3 +36,4 @@ jobs: args: release --rm-dist env: GITHUB_TOKEN: ${{ secrets.GO_RELEASER_GITHUB_TOKEN }} + GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} diff --git a/.goreleaser.yml b/.goreleaser.yml index 31c3390..9e5f091 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -25,3 +25,4 @@ archives: signs: - artifacts: checksum + args: [ "--batch", "-u", "{{ .Env.GPG_FINGERPRINT }}", "--output", "${signature}", "--detach-sign", "${artifact}" ]