Skip to content

Commit 753d58c

Browse files
authored
Fix ci.yaml workflows: uses new versions (#13)
1 parent 894e4d5 commit 753d58c

File tree

2 files changed

+17
-16
lines changed

2 files changed

+17
-16
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ jobs:
2323
- name: Checkout
2424
uses: actions/checkout@master
2525
- name: Setup Go
26-
uses: actions/setup-go@v2
26+
uses: actions/setup-go@v4
2727
with:
28-
go-version: 1.17
28+
go-version: "1.20"
2929
- id: go-cache-paths
3030
run: |
31-
echo "::set-output name=go-build::$(go env GOCACHE)"
32-
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
31+
echo "go-build=$(go env GOCACHE)" >> $GITHUB_OUTPUT
32+
echo "go-mod=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT
3333
- name: go build cache
34-
uses: actions/cache@v2
34+
uses: actions/cache@v4
3535
with:
3636
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
3737
path: |
@@ -48,14 +48,17 @@ jobs:
4848
uses: goreleaser/goreleaser-action@v2
4949
with:
5050
distribution: goreleaser
51-
version: latest
52-
args: release --snapshot --skip-publish --rm-dist
51+
version: v2.12.0
52+
args: release --snapshot
53+
env:
54+
GORELEASER_SKIP_PUBLISH: true
5355
- name: Publish release (GoReleaser)
5456
if: startsWith(github.ref, 'refs/tags/')
5557
uses: goreleaser/goreleaser-action@v2
5658
env:
5759
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60+
GORELEASER_SKIP_PUBLISH: true
5861
with:
5962
distribution: goreleaser
60-
version: latest
61-
args: release --rm-dist
63+
version: v2.12.0
64+
args: release

.goreleaser.yaml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1+
version: 2
2+
13
builds:
2-
- goos:
4+
- id: win
5+
goos:
36
- windows
47
ldflags:
58
- -H=windowsgui
6-
archives:
7-
- format: binary
8-
name_template: "{{ .ProjectName }}-{{ .Arch }}-v{{.Version}}"
9-
replacements:
10-
386: x86
11-
amd64: x64
9+
binary: "{{ .ProjectName }}-{{- if eq .Arch \"386\" }}x86{{ else if eq .Arch \"amd64\" }}x64{{ else }}{{ .Arch }}{{ end }}-v{{ .Version }}"

0 commit comments

Comments
 (0)