Actions releaser (#2)

* add workflow

* go version
This commit is contained in:
Dagen Brock 2022-01-02 18:04:43 -06:00 committed by Dagen Brock
parent dace22607f
commit 6cfdab09f6
2 changed files with 72 additions and 0 deletions

32
.github/workflows/publish_release.yml vendored Normal file
View File

@ -0,0 +1,32 @@
name: goreleaser
on:
pull_request:
push:
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17.5
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}

40
.goreleaser.yml Normal file
View File

@ -0,0 +1,40 @@
project_name: appy
before:
hooks:
# you may remove this if you don't use vgo
#- go mod tidy
# you may remove this if you don't need go generate
#- go generate ./...
builds:
- env:
- CGO_ENABLED=0
goos:
- windows
- darwin
- linux
- solaris
- freebsd
archives:
- replacements:
darwin: MacOS
linux: Linux
windows: Windows
freebsd: FreeBSD
solaris: Solaris
386: 32bit
amd64: 64bit
format_overrides:
- goos: windows
format: zip
- goos: darwin
format: zip
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'