Skip to content

Commit b52f89f

Browse files
committed
chore: add binary release
1 parent c1f1388 commit b52f89f

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed

.github/workflows/release.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: Release
3+
on:
4+
# https://github.com/actions/runner/issues/1007
5+
push:
6+
tags:
7+
- "v[0-9]+.[0-9]+.[0-9]+"
8+
9+
jobs:
10+
release:
11+
name: Release on GitHub
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Set up Go
15+
uses: actions/setup-go@v3
16+
id: go
17+
with:
18+
go-version: ^1.18
19+
20+
- name: Check out code
21+
uses: actions/checkout@v3
22+
23+
- name: Launch goreleaser
24+
uses: goreleaser/[email protected]
25+
with:
26+
args: release
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.goreleaser.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
before:
2+
hooks:
3+
- go mod tidy
4+
5+
builds:
6+
- main: "."
7+
binary: badrobot
8+
goos:
9+
- darwin
10+
- linux
11+
goarch:
12+
- amd64
13+
- arm64
14+
ignore:
15+
- goos: darwin
16+
goarch: arm
17+
env:
18+
- CGO_ENABLED=0
19+
20+
checksum:
21+
name_template: "{{ .ProjectName }}_checksums.txt"
22+
23+
archives:
24+
- name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
25+
26+
snapshot:
27+
name_template: "{{ .Tag }}-next"

0 commit comments

Comments
 (0)