Skip to content

Commit

Permalink
Add release config
Browse files Browse the repository at this point in the history
  • Loading branch information
LKaemmerling committed Nov 26, 2022
1 parent c79400e commit a0bcb7d
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 14 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Release
on: [ tags ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.19'
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30 changes: 16 additions & 14 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,20 @@ before:
hooks:
- make assets/dist
builds:
-
main: main.go
goos:
- main: main.go
goos:
- linux
- openbsd
- freebsd
goarch:
- amd64
- 386
- arm64
ldflags:
- -extldflags "-static" -s -w -X "main.version={{.Version}}" -X "main.commit={{.Commit}}" -X "main.date={{.Date}}"
hooks:
pre: packr
post: packr clean
goarch:
- amd64
- i386
- arm64
ldflags:
- -extldflags "-static" -s -w -X "main.version={{.Version}}" -X "main.commit={{.Commit}}" -X "main.date={{.Date}}"
hooks:
pre: packr
post: packr clean
checksum:
name_template: 'checksums.txt'
snapshot:
Expand All @@ -26,5 +25,8 @@ changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
- '^docs:'
- '^test:'
release:
draft: true
mode: append

0 comments on commit a0bcb7d

Please sign in to comment.