Skip to content

Commit 2cd44d5

Browse files
authored
fix goreleaser (#166)
* add goreleaser again * run on release * add goos matrix windows, linux, and macos amd64, arm4, and arm (older nas) * add upx * directly upload binaries, don't zip them they're already compressed with upx, zipping is pointless * only run the action once
1 parent 105c744 commit 2cd44d5

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

.github/goreleaser.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
builds:
2+
- goos:
3+
- darwin
4+
- windows
5+
- linux
6+
- freebsd
7+
goarch:
8+
- arm64
9+
- amd64
10+
- arm
11+
upx:
12+
- enabled: true
13+
archives:
14+
- format: binary

.github/workflows/goreleaser.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: goreleaser
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
goreleaser:
12+
runs-on: ubuntu-latest
13+
steps:
14+
-
15+
name: Checkout
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
-
20+
name: Set up Go
21+
uses: actions/setup-go@v5
22+
-
23+
name: Run GoReleaser
24+
uses: goreleaser/goreleaser-action@v6
25+
with:
26+
# either 'goreleaser' (default) or 'goreleaser-pro'
27+
distribution: goreleaser
28+
# 'latest', 'nightly', or a semver
29+
version: '~> v2'
30+
args: release --clean -f .github/goreleaser.yaml
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
34+
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}

0 commit comments

Comments
 (0)