-
-
Notifications
You must be signed in to change notification settings - Fork 94
64 lines (58 loc) · 2.34 KB
/
goreleaser.yml
File metadata and controls
64 lines (58 loc) · 2.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: goreleaser
on:
# This workflow is only triggered manually from the GitHub UI.
# Go to: Actions -> "goreleaser" workflow -> "Run workflow".
# This matches your intent: no automatic releases on push or tag.
workflow_dispatch:
# If in the future you want to trigger releases when pushing tags,
# you can uncomment the block below:
#
# push:
# tags:
# - 'v*' # e.g. v0.1.0, v1.2.3
jobs:
goreleaser:
name: Run GoReleaser
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v6
with:
# Fetch the full git history.
# GoReleaser uses tags and commits to determine the version
# and to generate changelogs. With a shallow clone this may fail
# or produce incomplete changelogs.
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
# Use the Go version declared in go.mod.
# This keeps local development and CI in sync automatically.
go-version-file: go.mod
# Alternatively you could hard-code a version:
# go-version: '1.22'
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: '22'
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v7
with:
# Use the standard GoReleaser distribution.
distribution: goreleaser
# Install the latest GoReleaser release.
# For fully reproducible builds you can pin a specific version here.
version: latest
# "release --clean" is the modern equivalent of "--rm-dist":
# it removes the dist/ directory before building, so you never
# accidentally ship stale artifacts from a previous run.
args: release --clean
env:
# GitHub automatically provides this token.
# GoReleaser uses it to create or update the GitHub Release and
# upload the build artifacts (archives, checksums, etc.).
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Node.js is installed above because the GoReleaser "before" hook now
# generates the manual PDF headlessly in temp/ before packaging.
# You previously had DEFAULT_BRANCH here; GoReleaser does not
# need it by default, so it is omitted for clarity.