Skip to content

Commit fe96de7

Browse files
committed
Move goreleaser to GitHub action.
1 parent fc16797 commit fe96de7

3 files changed

Lines changed: 44 additions & 1 deletion

File tree

.github/workflows/goreleaser.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: goreleaser
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
goreleaser:
10+
runs-on: ubuntu-latest
11+
steps:
12+
-
13+
name: Checkout
14+
uses: actions/checkout@v2
15+
with:
16+
fetch-depth: 0
17+
-
18+
name: Set up Go
19+
uses: actions/setup-go@v2
20+
with:
21+
go-version: 1.17.x
22+
-
23+
name: Import GPG key
24+
id: import_gpg
25+
uses: crazy-max/ghaction-import-gpg@v4
26+
with:
27+
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
28+
passphrase: ${{ secrets.GPG_PASSPHRASE }}
29+
-
30+
name: Run GoReleaser
31+
uses: goreleaser/goreleaser-action@v2
32+
with:
33+
# either 'goreleaser' (default) or 'goreleaser-pro'
34+
distribution: goreleaser
35+
version: latest
36+
args: release --rm-dist
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
40+
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
41+
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
42+

.goreleaser.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ snapshot:
8080
name_template: "{{ .Tag }}-next"
8181
signs:
8282
- artifacts: checksum
83+
args: ["--batch", "-u", "{{ .Env.GPG_FINGERPRINT }}", "--output", "${signature}", "--detach-sign", "${artifact}"]
8384
changelog:
8485
sort: asc
8586
filters:

update-release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ check git push
2727
echo Tagging update.
2828
check git tag -s -m \"release: ${newtag}\" -a ${newtag}
2929
echo Releasing.
30-
check goreleaser release --rm-dist
30+
check git push origin ${newtag}

0 commit comments

Comments
 (0)