From 39a8e864b9e53eba6eea9a35599f1570146f1373 Mon Sep 17 00:00:00 2001 From: christophe-duc Date: Wed, 7 Jan 2026 14:35:46 -0400 Subject: [PATCH] Update GoReleaser to v2 and fix deprecated configs --- .github/workflows/cd.yml | 20 +++++++++++--------- .goreleaser.yml | 24 +++++++++++------------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index baee58cf..9f3d065e 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -8,20 +8,22 @@ on: jobs: goreleaser: runs-on: ubuntu-latest + permissions: + contents: write steps: - name: Checkout code - uses: actions/checkout@v2 - - name: Unshallow repo - run: git fetch --prune --unshallow - - name: Setup Go - uses: actions/setup-go@v6 + uses: actions/checkout@v4 with: - go-version: 1.24.x + fetch-depth: 0 + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version: '1.23' - name: Run goreleaser - uses: goreleaser/goreleaser-action@v1 + uses: goreleaser/goreleaser-action@v6 with: distribution: goreleaser - version: v1.17.2 + version: '~> v2' args: release --clean env: - GITHUB_TOKEN: ${{secrets.TOKEN_GITHUB}} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yml b/.goreleaser.yml index 9b8f7d4d..0caa8172 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -36,12 +36,16 @@ builds: archives: - builds: - binary - replacements: - darwin: Darwin - linux: Linux - windows: Windows - 386: x86 - amd64: x86_64 + name_template: >- + {{ .ProjectName }}_ + {{- if eq .Os "darwin" }}Darwin + {{- else if eq .Os "linux" }}Linux + {{- else if eq .Os "windows" }}Windows + {{- else }}{{ .Os }}{{ end }}_ + {{- if eq .Arch "amd64" }}x86_64 + {{- else if eq .Arch "386" }}x86 + {{- else }}{{ .Arch }}{{ end }} + {{- if .Arm }}v{{ .Arm }}{{ end }} format_overrides: - goos: windows format: zip @@ -61,16 +65,10 @@ changelog: - "^bump" brews: - - tap: + - repository: owner: christophe-duc name: homebrew-lazypodman - - # Your app's homepage. - # Default is empty. homepage: "https://github.com/christophe-duc/lazypodman/" - - # Your app's description. - # Default is empty. description: "A simple terminal UI for podman, written in Go" #snapcrafts: # - builds: