Skip to content

Commit

Permalink
add signing
Browse files Browse the repository at this point in the history
  • Loading branch information
ramin committed Oct 25, 2023
1 parent f6d292e commit fc0f2eb
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,18 @@ 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
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
13 changes: 12 additions & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit fc0f2eb

Please sign in to comment.