Skip to content

Commit 5393acb

Browse files
authored
Merge pull request #5 from ovh/workflow
Fix workflows
2 parents 7ce21b5 + 9f9ca03 commit 5393acb

File tree

2 files changed

+15
-29
lines changed

2 files changed

+15
-29
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,28 @@ on:
55
tags:
66
- '*'
77

8+
permissions:
9+
contents: write
10+
811
jobs:
912
goreleaser:
1013
runs-on: ubuntu-latest
1114
steps:
1215
-
1316
name: Checkout
14-
uses: actions/checkout@v2
17+
uses: actions/checkout@v4
1518
with:
1619
fetch-depth: 0
1720
-
1821
name: Set up Go
19-
uses: actions/setup-go@v2
22+
uses: actions/setup-go@v4
2023
with:
21-
go-version: 1.15
24+
go-version: 1.21
2225
-
2326
name: Run GoReleaser
24-
uses: goreleaser/goreleaser-action@v2
27+
uses: goreleaser/goreleaser-action@v5
2528
with:
29+
distribution: goreleaser
2630
version: latest
2731
args: release --rm-dist
2832
env:

.goreleaser.yml

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
env:
2-
- GO111MODULE=on
31
before:
42
hooks:
53
- go mod download
@@ -14,21 +12,17 @@ builds:
1412
- netbsd
1513
- openbsd
1614
goarch:
17-
- 386
1815
- amd64
1916
- arm
2017
- arm64
2118
- ppc64le
2219
- mips64le
2320
- s390x
2421
goarm:
25-
- 5
26-
- 7
22+
- "5"
23+
- "7"
2724
gomips:
2825
- hardfloat
29-
ignore:
30-
- goos: windows
31-
goarch: 386
3226
checksum:
3327
name_template: 'checksums.txt'
3428
snapshot:
@@ -45,20 +39,8 @@ nfpms:
4539
formats:
4640
- deb
4741
- rpm
48-
overrides:
49-
deb:
50-
file_name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Arch }}{{ if .Arm }}{{ .Arm }}{{ end }}"
51-
replacements:
52-
386: i386
53-
5: el
54-
7: hf
55-
mips64le: mips64el
56-
rpm:
57-
file_name_template: "{{ .ProjectName }}-{{ .Version }}.{{ .Arch }}{{ if .Arm }}{{ .Arm }}{{ end }}"
58-
replacements:
59-
386: i386
60-
amd64: x86_64
61-
arm64: aarch64
62-
5: v7l
63-
7: v7hnl
64-
mips64le: mips64el
42+
file_name_template: >-
43+
{{- trimsuffix .ConventionalFileName .ConventionalExtension -}}
44+
{{- if and (eq .Arm "6") (eq .ConventionalExtension ".deb") }}6{{ end -}}
45+
{{- if not (eq .Amd64 "v1")}}{{ .Amd64 }}{{ end -}}
46+
{{- .ConventionalExtension -}}

0 commit comments

Comments
 (0)