Skip to content

Commit

Permalink
ci(release): sign rpm and deb packages
Browse files Browse the repository at this point in the history
Signed-off-by: Niccolò Fei <[email protected]>
  • Loading branch information
NiccoloFei committed Sep 19, 2024
1 parent b3e496d commit 0b300f4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/release-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,12 @@ jobs:
passphrase: ${{ secrets.GPG_PASSPHRASE }}
-
name: Set GoReleaser environment
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
run: |
echo GOPATH=$(go env GOPATH) >> $GITHUB_ENV
echo PWD=$(pwd) >> $GITHUB_ENV
echo "$GPG_PRIVATE_KEY" > gpg_signing_key.asc
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
Expand All @@ -156,6 +159,7 @@ jobs:
VERSION: ${{ steps.build-meta.outputs.version }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
NFPM_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
-
name: Publish Krew
if: |
Expand Down
6 changes: 6 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ nfpms:
formats:
- rpm
- deb
rpm:
signature:
key_file: gpg_signing_key.asc
deb:
signature:
key_file: gpg_signing_key.asc

checksum:
name_template: '{{ .ProjectName }}-{{ .Version }}-checksums.txt'
Expand Down

0 comments on commit 0b300f4

Please sign in to comment.