Skip to content

Commit 8c8a6f4

Browse files
committed
feature: Goreleaser config & gh action release
Signed-off-by: Arthur Broudoux <[email protected]>
1 parent e931328 commit 8c8a6f4

File tree

2 files changed

+70
-0
lines changed

2 files changed

+70
-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+
- "*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
goreleaser:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout Code
16+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Set up Go
21+
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a #v5.2.0
22+
with:
23+
go-version: "1.21.3"
24+
25+
- name: Publish Homebrew package with Goreleaser
26+
uses: goreleaser/goreleaser-action@v6
27+
with:
28+
distribution: goreleaser
29+
version: "${{ env.GITHUB_REF_NAME }}"
30+
args: release --clean
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.PUBLISHER_TOKEN }}

.goreleaser.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
version: 2
2+
3+
builds:
4+
- main: ./main.go
5+
binary: microcks-cli
6+
env:
7+
- CGO_ENABLED=0
8+
9+
release:
10+
prerelease: auto
11+
12+
universal_binaries:
13+
- replace: true
14+
15+
signs:
16+
- artifacts: checksum
17+
cmd: gpg2
18+
args:
19+
- "--batch"
20+
- "-u"
21+
- "{{ .Env.GPG_FINGERPRINT }}"
22+
- "--output"
23+
- "${signature}"
24+
- "--detach-sign"
25+
- "${artifact}"
26+
27+
brews:
28+
- name: microcks-cli
29+
homepage: https://github.com/microcks/microcks-cli
30+
repository:
31+
owner: microcks
32+
name: homebrew-tap
33+
34+
sboms:
35+
- artifacts: archive
36+
37+
checksum:
38+
name_template: "checksums.txt"

0 commit comments

Comments
 (0)