feat(signing): added goreleaser signing

This commit is contained in:
Richard Robert Reitz 2025-10-20 15:55:58 +02:00
parent df697c0ff6
commit a70e107a3f
2 changed files with 25 additions and 3 deletions

View file

@ -19,9 +19,16 @@ jobs:
go-version: ">=1.25.1" go-version: ">=1.25.1"
- name: Test code - name: Test code
run: make test run: make test
- name: Import GPG key
id: import_gpg
uses: https://github.com/crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: Run GoReleaser - name: Run GoReleaser
uses: https://github.com/goreleaser/goreleaser-action@v6 uses: https://github.com/goreleaser/goreleaser-action@v6
env: env:
GITEA_TOKEN: ${{ secrets.PACKAGES_TOKEN }} GITEA_TOKEN: ${{ secrets.PACKAGES_TOKEN }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
with: with:
args: release --clean args: release --clean

View file

@ -10,11 +10,11 @@ builds:
- CGO_ENABLED=0 - CGO_ENABLED=0
goos: goos:
- linux - linux
- darwin #- darwin
- windows #- windows
goarch: goarch:
- amd64 - amd64
- arm64 #- arm64
archives: archives:
- formats: [tar.gz] - formats: [tar.gz]
@ -31,6 +31,21 @@ archives:
- goos: windows - goos: windows
formats: [zip] formats: [zip]
signs:
- artifacts: checksum
cmd: gpg2
args:
- "--batch"
- "-u"
- "{{ .Env.GPG_FINGERPRINT }}"
- "--output"
- "${signature}"
- "--detach-sign"
- "${artifact}"
#binary_signs:
# - {}
changelog: changelog:
abbrev: 10 abbrev: 10
filters: filters: