Skip to content

Commit 6901616

Browse files
committed
ci: Run GoReleaser on Git tag.
1 parent e61c254 commit 6901616

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

.github/workflows/release.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
# This workflow uses actions that are not certified by GitHub. They are provided
3+
# by a third-party and are governed by separate terms of service, privacy
4+
# policy, and support documentation.
5+
6+
name: Release
7+
on:
8+
push:
9+
tags:
10+
- '*'
11+
12+
permissions:
13+
contents: write
14+
15+
jobs:
16+
release_job:
17+
runs-on: ubuntu-latest
18+
name: GoReleaser
19+
steps:
20+
- name: Harden Runner
21+
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
22+
with:
23+
egress-policy: audit
24+
25+
- name: Checkout Source
26+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
27+
with:
28+
fetch-depth: 0
29+
30+
- name: Import GPG Signing Key
31+
uses: crazy-max/ghaction-import-gpg@v6.0.0
32+
id: import_gpg
33+
with:
34+
gpg_private_key: ${{ secrets.GPG_KEY_B64 }}
35+
passphrase: ${{ secrets.GPG_PWD }}
36+
fingerprint: ${{ secrets.GPG_FINGERPRINT }}
37+
trust_level: 5
38+
git_user_signingkey: true
39+
git_commit_gpgsign: true
40+
git_tag_gpgsign: true
41+
42+
- name: GoReleaser Action
43+
uses: goreleaser/goreleaser-action@v5.0.0
44+
env:
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
47+
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
48+
with:
49+
distribution: goreleaser-pro
50+
version: latest
51+
args: release --clean

0 commit comments

Comments
 (0)