Skip to content

Commit

Permalink
ci: add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
martinlindhe committed Jan 11, 2024
1 parent e35a0d1 commit 2aff61d
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 6 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Release

on:
push:
tags:
- '*'

jobs:
goreleaser:
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.18
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
with:
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12 changes: 7 additions & 5 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,19 @@ builds:
ignore:
- goos: darwin
goarch: 386
# Archive customization

archives:
- id: tgz
format: tar.gz
format_overrides:
- goos: windows
format: zip
replacements:
amd64: 64-bit
386: 32-bit
darwin: macOS
files:
- README.md
- LICENSE

checksum:
name_template: 'checksums.txt'

changelog:
sort: asc
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ lint:
golangci-lint run ./...

release:
goreleaser --rm-dist
goreleaser --clean

test:
go test -v
Expand Down

0 comments on commit 2aff61d

Please sign in to comment.