Configure goreleaser

This commit is contained in:
Adriano Caloiaro 2020-11-18 09:54:52 -07:00
parent daf04e25b3
commit cba060fd6f
No known key found for this signature in database
GPG key ID: 9FFD0E7601F166AB
2 changed files with 67 additions and 0 deletions

28
.github/workflows/goreleaser.yml vendored Normal file
View file

@ -0,0 +1,28 @@
name: goreleaser
on:
push:
tags:
- '*'
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.15
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

39
.goreleaser.yml Normal file
View file

@ -0,0 +1,39 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
before:
hooks:
# You may remove this if you don't use go modules.
- go mod download
# you may remove this if you don't need go generate
- go generate ./...
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- darwin
release:
github:
owner: acaloiaro
name: di-tui
ids:
- di-tui
archives:
- replacements:
darwin: Darwin
linux: Linux
386: i386
amd64: x86_64
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'