Skip to content

Commit 142a588

Browse files
committed
Add go releaser
1 parent 4913ad1 commit 142a588

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

.github/workflows/release.yaml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Release
2+
on:
3+
push:
4+
tags:
5+
- 'v*'
6+
jobs:
7+
goreleaser:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: actions/setup-go@v5
12+
with:
13+
go-version-file: 'go.mod'
14+
- uses: goreleaser/goreleaser-action@v6
15+
with:
16+
args: release --clean
17+
env:
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.goreleaser.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
before:
2+
hooks:
3+
- go mod tidy
4+
builds:
5+
- env:
6+
- CGO_ENABLED=0
7+
goos:
8+
- darwin
9+
- freebsd
10+
- linux
11+
- windows
12+
archives:
13+
- name_template: "{{ .Os }}-{{ .Arch }}"
14+
format: binary
15+
snapshot:
16+
name_template: "{{ .Tag }}-{{ .Commit }}"
17+
changelog:
18+
use: github-native
19+
release:
20+
draft: true

0 commit comments

Comments
 (0)