Skip to content

Commit

Permalink
ci: update to latest formats and versions
Browse files Browse the repository at this point in the history
  • Loading branch information
dunglas committed Oct 12, 2023
1 parent a8c9179 commit dba5124
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 47 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -35,10 +35,10 @@ jobs:
echo "GORELEASER_CURRENT_TAG=$(awk 'NR==1 {print;exit}' <<< "$tags")" >> "$GITHUB_ENV"
echo "GORELEASER_PREVIOUS_TAG=$(awk 'NR==2 {print;exit}' <<< "$tags")" >> "$GITHUB_ENV"
- name: Release
uses: goreleaser/goreleaser-action@v4
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --clean
args: release --clean ${{ !startsWith(github.ref, 'refs/tags/v') && '--snapshot --skip-sign' || '' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- uses: actions/setup-go@v4
with:
Expand All @@ -32,7 +32,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- uses: actions/setup-go@v4
with:
Expand Down
94 changes: 53 additions & 41 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,6 @@
before:
hooks:
- go mod download
builds:
-
dir: cmd/vulcain
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
- windows
goarch:
- '386'
- amd64
- arm
- arm64
ignore:
- goos: darwin
goarch: '386'
archives:
-
replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
files:
- COPYRIGHT
- LICENSE
- README.md
format_overrides:
- goos: windows
format: zip
- go mod tidy
checksum:
name_template: 'checksums.txt'
snapshot:
Expand All @@ -41,12 +9,56 @@ changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
- "^docs:"
- "^test:"
- "^ci:"
- "^build:"
- "^chore:"
- "^Merge"
release:
prerelease: auto
env:
- CGO_ENABLED=0
builds:
- id: legacy
dir: cmd/vulcain
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
- windows
goarch:
- '386'
- amd64
- arm
- arm64
ignore:
- goos: darwin
goarch: '386'
archives:
- id: legacy
builds:
- legacy
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
files:
- COPYRIGHT
- LICENSE
- README.md
format_overrides:
- goos: windows
format: zip
dockers:
-
image_templates:
- 'dunglas/vulcain:{{ .Tag }}'
- 'dunglas/vulcain:v{{ .Major }}'
- 'dunglas/vulcain:v{{ .Major }}.{{ .Minor }}'
- 'dunglas/vulcain:latest'
- ids:
- legacy
image_templates:
- 'dunglas/vulcain:{{ .Tag }}'
- 'dunglas/vulcain:v{{ .Major }}'
- 'dunglas/vulcain:v{{ .Major }}.{{ .Minor }}'
- 'dunglas/vulcain:latest'

0 comments on commit dba5124

Please sign in to comment.