diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 55bb938..6f3b9e0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,6 +48,13 @@ jobs: with: go-version: ${{ needs.setup.outputs.go-version }} + - name: Import GPG key + id: import_gpg + uses: crazy-max/ghaction-import-gpg@v4 + with: + gpg_private_key: ${{ secrets.GPG_KEY }} + passphrase: ${{ secrets.GPG_PASSPHRASE }} + - uses: goreleaser/goreleaser-action@v5 with: distribution: goreleaser @@ -55,3 +62,4 @@ jobs: args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 30d93a1..c9f99a8 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -35,7 +35,18 @@ archives: format_overrides: - goos: windows format: zip - +signs: + - artifacts: checksum + args: + [ + "--batch", + "-u", + "{{ .Env.GPG_FINGERPRINT }}", + "--output", + "${signature}", + "--detach-sign", + "${artifact}", + ] changelog: sort: asc filters: