Skip to content

Commit 674280c

Browse files
committed
release: add GoReleaser workflow
1 parent 7c2e651 commit 674280c

File tree

2 files changed

+72
-0
lines changed

2 files changed

+72
-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+
release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Check out code
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Set up Go
21+
uses: actions/setup-go@v5
22+
with:
23+
go-version: ">=1.21"
24+
25+
- name: Run GoReleaser
26+
uses: goreleaser/goreleaser-action@v6
27+
with:
28+
version: latest
29+
args: release --clean
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+

.goreleaser.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
project_name: reflex
2+
3+
builds:
4+
- id: reflex
5+
main: ./cmd/reflex
6+
binary: reflex
7+
env:
8+
- CGO_ENABLED=0
9+
goos:
10+
- linux
11+
- darwin
12+
- windows
13+
goarch:
14+
- amd64
15+
- arm64
16+
ldflags:
17+
- -s -w
18+
19+
archives:
20+
- id: archive
21+
builds:
22+
- reflex
23+
name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}"
24+
format_overrides:
25+
- goos: windows
26+
format: zip
27+
files:
28+
- README.md
29+
30+
checksum:
31+
name_template: "checksums.txt"
32+
33+
release:
34+
# goreleaser uses the repo from the checked out git remote; GITHUB_TOKEN handles auth
35+
draft: false
36+
prerelease: auto
37+
38+
changelog:
39+
use: github
40+
sort: asc

0 commit comments

Comments
 (0)