fix: goreleaser tag race condition (#188)
Signed-off-by: matttrach <matt.trachier@suse.com>
This commit is contained in:
parent
d7c83ba1ea
commit
bd0cb43401
|
|
@ -74,7 +74,7 @@ jobs:
|
|||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0 https://github.com/goreleaser/goreleaser-action
|
||||
with:
|
||||
args: release --clean
|
||||
args: release --clean --config .goreleaser_rc.yml
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GPG_KEY_ID: ${{ env.GPG_KEY_ID }}
|
||||
|
|
|
|||
|
|
@ -129,9 +129,9 @@ jobs:
|
|||
echo "${GPG_KEY}" | gpg --import --batch > /dev/null || { echo "Failed to import GPG key"; exit 1; }
|
||||
- name: Run GoReleaser
|
||||
if: steps.release-please.outputs.version
|
||||
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0
|
||||
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0 https://github.com/goreleaser/goreleaser-action
|
||||
with:
|
||||
args: release --clean
|
||||
args: release --clean --config .goreleaser.yml
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GPG_KEY_ID: ${{ env.GPG_KEY_ID }}
|
||||
|
|
|
|||
|
|
@ -6,27 +6,33 @@ version: 2
|
|||
before:
|
||||
hooks:
|
||||
- go mod tidy
|
||||
git:
|
||||
ignore_tags:
|
||||
- "*rc*"
|
||||
builds:
|
||||
- env:
|
||||
# goreleaser does not work with CGO, it could also complicate
|
||||
# usage by users in CI/CD systems like HCP Terraform where
|
||||
# they are unable to install libraries.
|
||||
- CGO_ENABLED=0
|
||||
mod_timestamp: '{{ .CommitTimestamp }}'
|
||||
flags:
|
||||
- -trimpath
|
||||
ldflags:
|
||||
- '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}'
|
||||
goos:
|
||||
- freebsd
|
||||
- windows
|
||||
- linux
|
||||
- darwin
|
||||
goarch:
|
||||
- amd64
|
||||
- arm
|
||||
- arm64
|
||||
binary: '{{ .ProjectName }}_v{{ .Version }}'
|
||||
- binary: '{{ .ProjectName }}_v{{ .Version }}'
|
||||
env:
|
||||
# goreleaser does not work with CGO, it could also complicate
|
||||
# usage by users in CI/CD systems like HCP Terraform where
|
||||
# they are unable to install libraries.
|
||||
- CGO_ENABLED=0
|
||||
mod_timestamp: '{{ .CommitTimestamp }}'
|
||||
flags:
|
||||
- -trimpath
|
||||
ldflags:
|
||||
- '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}'
|
||||
goos:
|
||||
- freebsd
|
||||
- windows
|
||||
- linux
|
||||
- darwin
|
||||
goarch:
|
||||
- amd64
|
||||
- arm
|
||||
- arm64
|
||||
ignore:
|
||||
- goos: windows
|
||||
goarch: arm
|
||||
archives:
|
||||
- formats: [ 'zip' ]
|
||||
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
|
||||
|
|
|
|||
|
|
@ -0,0 +1,62 @@
|
|||
|
||||
|
||||
# https://goreleaser.com for documentation
|
||||
|
||||
version: 2
|
||||
before:
|
||||
hooks:
|
||||
- go mod tidy
|
||||
builds:
|
||||
- binary: '{{ .ProjectName }}_v{{ .Version }}'
|
||||
env:
|
||||
# goreleaser does not work with CGO, it could also complicate
|
||||
# usage by users in CI/CD systems like HCP Terraform where
|
||||
# they are unable to install libraries.
|
||||
- CGO_ENABLED=0
|
||||
mod_timestamp: '{{ .CommitTimestamp }}'
|
||||
flags:
|
||||
- -trimpath
|
||||
ldflags:
|
||||
- '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}'
|
||||
goos:
|
||||
- freebsd
|
||||
- windows
|
||||
- linux
|
||||
- darwin
|
||||
goarch:
|
||||
- amd64
|
||||
- arm
|
||||
- arm64
|
||||
ignore:
|
||||
- goos: windows
|
||||
goarch: arm
|
||||
archives:
|
||||
- formats: [ 'zip' ]
|
||||
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
|
||||
checksum:
|
||||
extra_files:
|
||||
- glob: 'terraform-registry-manifest.json'
|
||||
name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json'
|
||||
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
|
||||
algorithm: sha256
|
||||
signs:
|
||||
- artifacts: checksum
|
||||
args:
|
||||
- "--detach-sig"
|
||||
- "--pinentry-mode"
|
||||
- "loopback"
|
||||
- "--passphrase"
|
||||
- "{{ .Env.GPG_PASSPHRASE }}"
|
||||
- "--local-user"
|
||||
- "{{ .Env.GPG_KEY_ID }}"
|
||||
- "--output"
|
||||
- "${signature}"
|
||||
- "--sign"
|
||||
- "${artifact}"
|
||||
release:
|
||||
extra_files:
|
||||
- glob: 'terraform-registry-manifest.json'
|
||||
name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json'
|
||||
prerelease: auto
|
||||
changelog:
|
||||
disable: true
|
||||
Loading…
Reference in New Issue