Skip to content

Commit 905cbdf

Browse files
committed
add goreleaser workflow
1 parent efe55ca commit 905cbdf

File tree

2 files changed

+73
-0
lines changed

2 files changed

+73
-0
lines changed

.github/workflows/release.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
goreleaser:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Setup Go
21+
uses: actions/setup-go@v5
22+
with:
23+
go-version-file: go.mod
24+
25+
- name: Run GoReleaser
26+
uses: goreleaser/goreleaser-action@v6
27+
with:
28+
distribution: goreleaser
29+
version: latest
30+
args: release --clean
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.goreleaser.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
version: 2
2+
3+
project_name: rollbaz
4+
5+
before:
6+
hooks:
7+
- go mod tidy
8+
9+
builds:
10+
- id: rollbaz
11+
main: ./cmd/rollbaz
12+
binary: rollbaz
13+
env:
14+
- CGO_ENABLED=0
15+
goos:
16+
- darwin
17+
- linux
18+
- windows
19+
goarch:
20+
- amd64
21+
- arm64
22+
23+
archives:
24+
- id: default
25+
formats: [tar.gz]
26+
format_overrides:
27+
- goos: windows
28+
formats: [zip]
29+
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
30+
31+
checksum:
32+
name_template: checksums.txt
33+
34+
changelog:
35+
sort: asc
36+
use: github
37+
38+
release:
39+
github:
40+
owner: kevinsheth
41+
name: rollbaz

0 commit comments

Comments
 (0)