Skip to content

Commit 1b15617

Browse files
committed
Update GH Actions and goreleaser config
1 parent 2463492 commit 1b15617

File tree

3 files changed

+16
-13
lines changed

3 files changed

+16
-13
lines changed

Diff for: .github/workflows/build.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515

16-
- name: Set up Go 1.13
17-
uses: actions/setup-go@v1
16+
- name: Set up Go 1.22
17+
uses: actions/setup-go@v4
1818
with:
19-
go-version: 1.13
19+
go-version: 1.22
2020
id: go
2121

2222
- name: Check out code into the Go module directory
23-
uses: actions/checkout@v2
23+
uses: actions/checkout@v4
2424

2525
- name: Get dependencies
2626
run: go get -v -t -d ./...

Diff for: .github/workflows/release.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Checkout
18-
uses: actions/checkout@v2
18+
uses: actions/checkout@v4
1919
- name: Unshallow
2020
run: git fetch --prune --unshallow
2121
- name: Set up Go
22-
uses: actions/setup-go@v1
22+
uses: actions/setup-go@v4
2323
with:
24-
go-version: 1.13.x
24+
go-version: 1.22.x
2525
- name: Run GoReleaser
26-
uses: goreleaser/goreleaser-action@v1
26+
uses: goreleaser/goreleaser-action@v4
2727
with:
2828
version: latest
29-
args: release --rm-dist
29+
args: release --clean
3030
env:
3131
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Diff for: .goreleaser.yml

+7-4
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,13 @@ changelog:
2323
- Merge pull request
2424
- Merge branch
2525
archives:
26-
- name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
27-
replacements:
28-
linux: Linux
29-
amd64: x86_64
26+
- name_template: >-
27+
{{ .ProjectName }}_{{ .Version }}_
28+
{{- if eq .Os "linux" }}Linux
29+
{{- else }}{{ .Os }}{{ end }}_
30+
{{- if eq .Arch "amd64" }}x86_64
31+
{{- else }}{{ .Arch }}{{ end }}
32+
{{- if .Arm }}v{{ .Arm }}{{ end }}
3033
nfpms:
3134
- package_name: "rsyslog-exporter"
3235
homepage: https://github.com/aleroyer/rsyslog_exporter

0 commit comments

Comments
 (0)