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: |