From 9f9ca031340ce99a427117fa0714c699f30a598d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20SO=C3=8BTE?= Date: Mon, 22 Jan 2024 14:49:12 +0000 Subject: [PATCH] Fix workflows --- .github/workflows/release.yml | 12 ++++++++---- .goreleaser.yml | 32 +++++++------------------------- 2 files changed, 15 insertions(+), 29 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3c97636..d5fecd1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,24 +5,28 @@ on: tags: - '*' +permissions: + contents: write + jobs: goreleaser: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v4 with: - go-version: 1.15 + go-version: 1.21 - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v2 + uses: goreleaser/goreleaser-action@v5 with: + distribution: goreleaser version: latest args: release --rm-dist env: diff --git a/.goreleaser.yml b/.goreleaser.yml index 033bc33..0754ec5 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,5 +1,3 @@ -env: - - GO111MODULE=on before: hooks: - go mod download @@ -14,7 +12,6 @@ builds: - netbsd - openbsd goarch: - - 386 - amd64 - arm - arm64 @@ -22,13 +19,10 @@ builds: - mips64le - s390x goarm: - - 5 - - 7 + - "5" + - "7" gomips: - hardfloat - ignore: - - goos: windows - goarch: 386 checksum: name_template: 'checksums.txt' snapshot: @@ -45,20 +39,8 @@ nfpms: formats: - deb - rpm - overrides: - deb: - file_name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Arch }}{{ if .Arm }}{{ .Arm }}{{ end }}" - replacements: - 386: i386 - 5: el - 7: hf - mips64le: mips64el - rpm: - file_name_template: "{{ .ProjectName }}-{{ .Version }}.{{ .Arch }}{{ if .Arm }}{{ .Arm }}{{ end }}" - replacements: - 386: i386 - amd64: x86_64 - arm64: aarch64 - 5: v7l - 7: v7hnl - mips64le: mips64el + file_name_template: >- + {{- trimsuffix .ConventionalFileName .ConventionalExtension -}} + {{- if and (eq .Arm "6") (eq .ConventionalExtension ".deb") }}6{{ end -}} + {{- if not (eq .Amd64 "v1")}}{{ .Amd64 }}{{ end -}} + {{- .ConventionalExtension -}} \ No newline at end of file