From 3de18a25a658049ded15564f1bcb69aa01efa3a3 Mon Sep 17 00:00:00 2001 From: Krzysztof Grodzicki Date: Wed, 16 Sep 2026 10:22:07 +0200 Subject: [PATCH] fix: migrate GoReleaser config to v2 so tag pushes publish releases again - replace removed --rm-dist with --clean and bump goreleaser-action to v7 pinned to ~> v2 - add version: 2 and drop archives.replacements for a name_template that keeps the existing asset names - rename brews tap/folder to repository/directory and point at the renamed homebrew-tap repo - fetch full history on checkout for changelog generation - ignore dist/ --- .github/workflows/release.yml | 8 +++++--- .gitignore | 2 ++ .goreleaser.yml | 30 ++++++++++++++---------------- 3 files changed, 21 insertions(+), 19 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0832e29..94e47ae 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,6 +12,8 @@ jobs: - name: Checkout uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Set up Go uses: actions/setup-go@v5 @@ -19,9 +21,9 @@ jobs: go-version: "1.27" - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v2 + uses: goreleaser/goreleaser-action@v7 with: - version: latest - args: release --rm-dist + version: '~> v2' + args: release --clean env: GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} diff --git a/.gitignore b/.gitignore index a823782..fc6ec9d 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,5 @@ *.pem jwk.json + +dist/ diff --git a/.goreleaser.yml b/.goreleaser.yml index 52b871c..2bc8354 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,44 +1,42 @@ -env: - - GO111MODULE=on +version: 2 builds: - binary: flow main: ./cmd/flow/main.go env: - CGO_ENABLED=0 - - GO111MODULE=on goos: - linux - darwin - windows goarch: - - 386 + - "386" - amd64 - arm64 + before: hooks: - make deps - make test archives: - - name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}' - replacements: - darwin: Darwin - linux: Linux - windows: Windows - 386: i386 - amd64: x86_64 - arm64: aarch64 + - name_template: >- + {{ .ProjectName }}_{{ title .Os }}_ + {{- if eq .Arch "amd64" }}x86_64 + {{- else if eq .Arch "386" }}i386 + {{- else if eq .Arch "arm64" }}aarch64 + {{- else }}{{ .Arch }}{{ end }} format_overrides: - goos: windows - format: zip + formats: + - zip brews: - name: flow - tap: + repository: owner: flow-lab - name: flow-tap - folder: Formula + name: homebrew-tap + directory: Formula homepage: "https://www.flowlab.no/" description: "AWS tooling for faster development." test: |