Migrate to goreleaser v2

This commit is contained in:
Dave Gallant
2024-07-21 15:12:00 -04:00
parent 0ec8aa1977
commit 86a0869bb5
2 changed files with 26 additions and 27 deletions

View File

@@ -18,13 +18,13 @@ jobs:
name: Set up Go name: Set up Go
uses: actions/setup-go@v5 uses: actions/setup-go@v5
with: with:
go-version: 1.22 go-version: "1.22"
- -
name: Run GoReleaser name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6 uses: goreleaser/goreleaser-action@v6
with: with:
version: '~> v0' version: '~> v2'
args: release --rm-dist args: release --clean
env: env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
CGO_ENABLED: 0 CGO_ENABLED: 0

View File

@@ -1,36 +1,35 @@
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=jcroql
version: 2
before: before:
hooks: hooks:
- go mod tidy - go mod tidy
- go get -v - go get -v
- rm -rf dist - rm -rf dist
builds: builds:
- - env:
env: - CGO_ENABLED=0
- CGO_ENABLED=0 ldflags:
ldflags: - -s -w
- -s -w goos:
goos: - darwin
- darwin - linux
- linux goarch:
goarch: - amd64
- amd64 - arm
- arm - arm64
- arm64
archives:
- replacements:
darwin: Darwin
linux: Linux
amd64: x86_64
checksum: checksum:
name_template: 'checksums.txt' name_template: "checksums.txt"
snapshot: snapshot:
name_template: "{{ .Tag }}" name_template: "{{ .Tag }}"
changelog: changelog:
sort: asc sort: asc
use: github
filters: filters:
exclude: exclude:
- '^docs:' - "^docs:"
- '^test:' - "^test:"
release: release:
github: github:
owner: davegallant owner: davegallant
@@ -38,12 +37,12 @@ release:
# Check https://goreleaser.com/customization/homebrew/ # Check https://goreleaser.com/customization/homebrew/
brews: brews:
- homepage: 'https://github.com/davegallant/homebrew-public' - homepage: "https://github.com/davegallant/homebrew-public"
description: 'a client for vpngate.net' description: "a client for vpngate.net"
folder: Formula directory: Formula
commit_author: commit_author:
name: davegallant name: davegallant
email: davegallant@gmail.com email: davegallant@gmail.com
tap: repository:
owner: davegallant owner: davegallant
name: homebrew-public name: homebrew-public