Skip to content

Commit af95f66

Browse files
committed
Add GitHub Actions workflow for GoReleaser deployment
1 parent 8f198ff commit af95f66

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/release.yml

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

0 commit comments

Comments
 (0)