Skip to content

Commit

Permalink
ci: bump goreleaser for Github Action from 1.4.1 to 1.16.2 (aquasecur…
Browse files Browse the repository at this point in the history
  • Loading branch information
afdesk authored Apr 12, 2023
1 parent 707ea94 commit 0bebec1
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/canary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
uses: ./.github/workflows/reusable-release.yaml
with:
goreleaser_config: goreleaser-canary.yml
goreleaser_options: '--snapshot --rm-dist --timeout 60m' # will not release
goreleaser_options: '--snapshot --clean --timeout 60m' # will not release
secrets: inherit

upload-binaries:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
uses: ./.github/workflows/reusable-release.yaml
with:
goreleaser_config: goreleaser.yml
goreleaser_options: '--rm-dist --timeout 90m'
goreleaser_options: '--clean --timeout 90m'
secrets: inherit

deploy-packages:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
- name: GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
version: v1.4.1
version: v1.16.2
args: release -f=${{ inputs.goreleaser_config}} ${{ inputs.goreleaser_options}}
env:
GITHUB_TOKEN: ${{ secrets.ORG_REPO_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,6 @@ jobs:
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
version: v1.4.1
args: release --skip-sign --snapshot --rm-dist --skip-publish --timeout 90m
version: v1.16.2
args: release --skip-sign --snapshot --clean --skip-publish --timeout 90m

14 changes: 7 additions & 7 deletions goreleaser-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ builds:
archives:
-
format: tar.gz
name_template: "{{.ProjectName}}_{{.Version}}_{{.Os}}-{{.Arch}}"
replacements:
amd64: 64bit
arm64: ARM64
darwin: macOS
linux: Linux
windows: Windows
name_template: >-
{{ .ProjectName }}_{{ .Version }}_
{{- if eq .Os "darwin" }}macOS
{{- else}}{{- title .Os }}{{ end }}-
{{- if eq .Arch "amd64" }}64bit
{{- else if eq .Arch "arm64" }}ARM64
{{- else }}{{ .Arch }}{{ end }}
files:
- README.md
- LICENSE
Expand Down
56 changes: 29 additions & 27 deletions goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,40 +57,42 @@ nfpms:
maintainer: "Teppei Fukuda <[email protected]>"
description: "A Fast Vulnerability Scanner for Containers"
license: "Apache-2.0"
file_name_template: "{{.ProjectName}}_{{.Version}}_{{.Os}}-{{.Arch}}"
replacements:
amd64: 64bit
386: 32bit
arm: ARM
arm64: ARM64
ppc64le: PPC64LE
darwin: macOS
linux: Linux
openbsd: OpenBSD
netbsd: NetBSD
freebsd: FreeBSD
dragonfly: DragonFlyBSD
windows: Windows
file_name_template: >-
{{ .ProjectName }}_{{ .Version }}_
{{- if eq .Os "darwin" }}macOS
{{- else if eq .Os "openbsd" }}OpenBSD
{{- else if eq .Os "netbsd" }}NetBSD
{{- else if eq .Os "freebsd" }}FreeBSD
{{- else if eq .Os "dragonfly" }}DragonFlyBSD
{{- else}}{{- title .Os }}{{ end }}-
{{- if eq .Arch "amd64" }}64bit
{{- else if eq .Arch "386" }}32bit
{{- else if eq .Arch "arm" }}ARM
{{- else if eq .Arch "arm64" }}ARM64
{{- else if eq .Arch "ppc64le" }}PPC64LE
{{- else }}{{ .Arch }}{{ end }}
contents:
- src: contrib/*.tpl
dst: /usr/local/share/trivy/templates

archives:
-
format: tar.gz
name_template: "{{.ProjectName}}_{{.Version}}_{{.Os}}-{{.Arch}}"
replacements:
amd64: 64bit
386: 32bit
arm: ARM
arm64: ARM64
ppc64le: PPC64LE
darwin: macOS
linux: Linux
openbsd: OpenBSD
netbsd: NetBSD
freebsd: FreeBSD
dragonfly: DragonFlyBSD
name_template: >-
{{ .ProjectName }}_{{ .Version }}_
{{- if eq .Os "darwin" }}macOS
{{- else if eq .Os "linux" }}Linux
{{- else if eq .Os "openbsd" }}OpenBSD
{{- else if eq .Os "netbsd" }}NetBSD
{{- else if eq .Os "freebsd" }}FreeBSD
{{- else if eq .Os "dragonfly" }}DragonFlyBSD
{{- else}}{{- .Os }}{{ end }}-
{{- if eq .Arch "amd64" }}64bit
{{- else if eq .Arch "386" }}32bit
{{- else if eq .Arch "arm" }}ARM
{{- else if eq .Arch "arm64" }}ARM64
{{- else if eq .Arch "ppc64le" }}PPC64LE
{{- else }}{{ .Arch }}{{ end }}
files:
- README.md
- LICENSE
Expand Down

0 comments on commit 0bebec1

Please sign in to comment.