File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 5
5
types : [published]
6
6
workflow_dispatch :
7
7
inputs :
8
+ tag :
9
+ description : " Tag to release (e.g. v0.0.1)"
10
+ required : true
8
11
skip_publish :
9
12
description : " Skip binary publish"
10
13
required : false
17
20
description : " Skip homebrew publish"
18
21
required : false
19
22
default : " false"
23
+ skip_validate :
24
+ description : " Skip GoReleaser validation"
25
+ required : false
26
+ default : " false"
20
27
21
28
permissions :
22
29
contents : write
30
37
with :
31
38
fetch-depth : 0
32
39
40
+ - name : Checkout release tag
41
+ run : |
42
+ git fetch --tags
43
+ TAG="${{ github.event.release.tag_name || github.event.inputs.tag }}"
44
+ if [ -z "$TAG" ]; then
45
+ echo "Error: No tag provided in release event or workflow_dispatch input"
46
+ exit 1
47
+ fi
48
+ echo "Checking out tag $TAG"
49
+ git checkout -- "refs/tags/$TAG"
50
+
33
51
- name : Set up Go (from go.mod)
34
52
uses : actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
35
53
with :
56
74
args : >
57
75
release --clean
58
76
${{ github.event.inputs.skip_publish == 'true' && ' --skip publish' || '' }}
77
+ ${{ github.event.inputs.skip_validate == 'true' && ' --skip validate' || '' }}
59
78
${{ github.event.inputs.skip_docker == 'true' && ' --skip docker' || '' }}
60
79
${{ github.event.inputs.skip_homebrew == 'true' && ' --skip homebrew' || '' }}
61
80
env :
You can’t perform that action at this time.
0 commit comments