File tree Expand file tree Collapse file tree 1 file changed +38
-9
lines changed Expand file tree Collapse file tree 1 file changed +38
-9
lines changed Original file line number Diff line number Diff line change 1
1
name : release
2
-
3
2
on :
4
- push :
5
- tags :
6
- - " *"
7
-
8
- permissions :
9
- contents : write
3
+ workflow_dispatch :
4
+ inputs :
5
+ branch :
6
+ description : ' Branch to release'
7
+ required : true
8
+ version :
9
+ description : ' Release version'
10
+ required : true
10
11
11
12
jobs :
12
13
goreleaser :
14
+ name : Release
13
15
runs-on : ubuntu-latest
16
+ permissions :
17
+ issues : write
18
+ contents : write
19
+ deployments : write
20
+ id-token : write
14
21
steps :
15
22
- name : Checkout Code
16
23
uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
17
24
with :
25
+ ssh-key : ${{ secrets.RELEASE_DEPLOY_KEY }}
18
26
fetch-depth : 0
27
+ ref : ${{ github.event.inputs.branch }}
19
28
20
29
- name : Set up Go
21
30
uses : actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
22
31
with :
23
- go-version : " 1.21.3"
32
+ go-version-file : ./go.mod
33
+ cache-dependency-path : ./go.sum
34
+
35
+ - name : Place a Git tag and push it
36
+ run : |
37
+ git config user.name "microcks-bot"
38
+ git config user.email "[email protected] "
39
+ git tag ${{ github.event.inputs.version }}
40
+ git push origin ${{ github.event.inputs.version }}
41
+
42
+ - name : Import GPG key
43
+ id : import-gpg
44
+ uses : crazy-max/ghaction-import-gpg@v6
45
+ with :
46
+ gpg_private_key : ${{ secrets.GORELEASER_GPG_SECRET_KEY }}
47
+ passphrase : ${{ secrets.GORELEASER_GPG_PASSPHRASE }}
48
+
49
+ - name : Install Syft for GoReleaser
50
+ run : |
51
+ curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin
24
52
25
53
- name : Publish Homebrew package with Goreleaser
26
54
uses : goreleaser/goreleaser-action@v6
27
55
with :
28
56
distribution : goreleaser
29
- version : " ${{ env.GITHUB_REF_NAME }} "
57
+ version : " ~> v2 "
30
58
args : release --clean
31
59
env :
32
60
GITHUB_TOKEN : ${{ secrets.PUBLISHER_TOKEN }}
61
+ GPG_FINGERPRINT : ${{ steps.import-gpg.outputs.fingerprint }}
You can’t perform that action at this time.
0 commit comments