chore: add goreleaser

main
sudo pacman -Syu 2021-11-14 13:27:52 +07:00
parent 951fe9ecf3
commit 4d9c57cc79
3 changed files with 50 additions and 0 deletions

27
.github/workflows/goreleaser.yaml vendored Normal file
View File

@ -0,0 +1,27 @@
name: goreleaser
on:
push:
tags:
- "*"
permissions:
contents: write
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-go@v2
with:
go-version: "~1.17"
- uses: goreleaser/goreleaser-action@v2
with:
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

3
.gitignore vendored
View File

@ -12,3 +12,6 @@
# Go
coverage.out
# GoReleaser
dist/

20
.goreleaser.yml Normal file
View File

@ -0,0 +1,20 @@
before:
hooks:
- go mod tidy
builds:
- main: ./cmd/changeloguru
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
universal_binaries:
- replace: true
archives:
- format_overrides:
- goos: windows
format: zip
changelog:
skip: true