Skip to content

Commit 5f6d78a

Browse files
ci: add goreleaser and github actions for beta releases
1 parent 757748a commit 5f6d78a

2 files changed

Lines changed: 70 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: goreleaser
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
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+
- name: Set up Go
20+
uses: actions/setup-go@v5
21+
with:
22+
go-version: stable
23+
- name: Run GoReleaser
24+
uses: goreleaser/goreleaser-action@v6
25+
with:
26+
distribution: goreleaser
27+
version: latest
28+
args: release --clean
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.goreleaser.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
version: 2
2+
3+
project_name: lv
4+
5+
builds:
6+
- env:
7+
- CGO_ENABLED=0
8+
goos:
9+
- linux
10+
- darwin
11+
goarch:
12+
- amd64
13+
- arm64
14+
binary: lv
15+
ldflags:
16+
- -s -w
17+
18+
archives:
19+
- format: tar.gz
20+
# this name template makes the archive name compatible with the standard
21+
# conventions used in the release page
22+
name_template: >-
23+
{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}
24+
# use this for the binary name inside the archive
25+
files:
26+
- LICENSE
27+
- README.md
28+
29+
checksum:
30+
name_template: 'checksums.txt'
31+
32+
snapshot:
33+
version_template: "{{ .Tag }}-next"
34+
35+
changelog:
36+
sort: asc
37+
filters:
38+
exclude:
39+
- '^docs:'
40+
- '^test:'

0 commit comments

Comments
 (0)