I am trying to use .goreleaser.yaml to publish binary files.
builds:
- env:
- CGO_ENABLED=0
flags:
- -trimpath
ldflags:
- '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}'
goos:
- windows
- linux
- darwin
goarch:
- amd64
- '386'
- arm
- arm64
ignore:
- goos: darwin
goarch: '386'
binary: '{{ .ProjectName }}_v{{ .Version }}'
archives:
- format: zip
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
checksum:
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
algorithm: sha256
signs:
- artifacts: checksum
args:
- "--batch"
- "--local-user"
- "${GPG_USER}"
- "${GPG_FINGERPRINT}"
- "--output"
- "${signature}"
- "--detach-sign"
- "${artifact}"
release:
# draft: true
changelog:
skip: true
I used gpg key to push commits to the repo.
The problem is when i am trying to use signs in the goreleaser i get:
тип release failed after 138.65s error=sign: gpg failed
but when i am trying to run this command on my local laptop the command finishing successfully .
The command is:
gpg --batch ${env.GPG_FINGERPRINT} --output dist/terraform-provider-test_0.0.34_SHA256SUMS.sig --det
ach-sign dist/terraform-provider-test_0.0.34_SHA256SUM