Skip to content

Commit e2e06bf

Browse files
author
parisb
committed
ci: add release workflow
1 parent 68a030d commit e2e06bf

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/release.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Release
2+
on:
3+
workflow_run:
4+
workflows: ["PR"]
5+
types:
6+
- completed
7+
branches:
8+
- stable
9+
10+
permissions:
11+
contents: write
12+
# packages: write
13+
# issues: write
14+
# id-token: write
15+
16+
jobs:
17+
release:
18+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
19+
runs-on: ubuntu-latest
20+
permissions:
21+
contents: write
22+
issues: write
23+
pull-requests: write
24+
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v4
28+
with:
29+
fetch-depth: 0
30+
- name: Set up Go
31+
uses: actions/setup-go@v5
32+
with:
33+
go-version: stable
34+
# More assembly might be required: Docker logins, GPG, etc.
35+
# It all depends on your needs.
36+
- name: github-action-svu
37+
uses: charlesthomas/[email protected]+3.2.3
38+
- name: Run GoReleaser
39+
uses: goreleaser/goreleaser-action@v6
40+
with:
41+
# either 'goreleaser' (default) or 'goreleaser-pro'
42+
distribution: goreleaser
43+
# 'latest', 'nightly', or a semver
44+
version: "~> v2"
45+
args: release --clean
46+
env:
47+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48+
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
49+
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}

0 commit comments

Comments
 (0)