-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (52 loc) · 1.38 KB
/
Copy pathrelease.yml
File metadata and controls
59 lines (52 loc) · 1.38 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
name: Release
on:
push:
tags:
- "v*"
workflow_dispatch:
inputs:
tag:
description: "Existing tag to re-release (e.g. v0.2.0). Leave blank for HEAD."
required: false
default: ""
type: string
snapshot:
description: "Build a snapshot release (does not tag or publish)."
required: false
default: "false"
type: boolean
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 0
ref: ${{ inputs.tag || github.ref }}
- uses: actions/setup-go@v6
with:
go-version: "1.25"
- name: Validate GoReleaser config
uses: goreleaser/goreleaser-action@v6.1.0
with:
distribution: goreleaser
version: v2.14.1
args: check
continue-on-error: true
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6.1.0
with:
distribution: goreleaser
version: v2.14.1
args: release --clean ${{ inputs.snapshot && '--snapshot' || '' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: release-artifacts
path: dist/
retention-days: 30