diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index 928129a..3a92958 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -25,10 +25,10 @@ jobs: go-version: stable - name: Run Releaser - uses: goreleaser/goreleaser-action@v5 + uses: goreleaser/goreleaser-action@v6 with: distribution: goreleaser - version: latest + version: '~> v2' args: release --clean env: GITHUB_TOKEN: ${{ secrets.TOKEN }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 26da514..80903a8 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,3 +1,5 @@ +version: 2 + before: hooks: - go mod tidy @@ -23,7 +25,7 @@ builds: - -X=main.Build={{.Commit}} -X=main.BuildTime={{.Date}} -X=main.Version={{.Version}} archives: - - format: tar.gz + - formats: [ 'tar.gz' ] # this name template makes the OS and Arch compatible with the results of uname. name_template: >- {{ .ProjectName }}_v{{ .Version }}_ @@ -43,7 +45,7 @@ archives: # use zip for windows archives format_overrides: - goos: windows - format: zip + formats: [ 'zip' ] # Additional files/globs you want to add to the archive. # @@ -58,7 +60,7 @@ checksum: name_template: 'checksums.txt' snapshot: - name_template: "{{ incpatch .Version }}-next" + version_template: "{{ incpatch .Version }}-{{.ShortCommit}}" changelog: sort: asc @@ -86,7 +88,7 @@ nfpms: license: Apache 2.0 - builds: + ids: - versitygw formats: diff --git a/Makefile b/Makefile index 5d301c9..6795e49 100644 --- a/Makefile +++ b/Makefile @@ -72,6 +72,11 @@ dist: rm -f VERSION gzip -f $(TARFILE) +.PHONY: snapshot +snapshot: +# brew install goreleaser/tap/goreleaser + goreleaser release --snapshot --skip publish --clean + # Creates and runs S3 gateway instance in a docker container .PHONY: up-posix up-posix: