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 11name : release
2-
32on :
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
1011
1112jobs :
1213 goreleaser :
14+ name : Release
1315 runs-on : ubuntu-latest
16+ permissions :
17+ issues : write
18+ contents : write
19+ deployments : write
20+ id-token : write
1421 steps :
1522 - name : Checkout Code
1623 uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
1724 with :
25+ ssh-key : ${{ secrets.RELEASE_DEPLOY_KEY }}
1826 fetch-depth : 0
27+ ref : ${{ github.event.inputs.branch }}
1928
2029 - name : Set up Go
2130 uses : actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
2231 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
2452
2553 - name : Publish Homebrew package with Goreleaser
2654 uses : goreleaser/goreleaser-action@v6
2755 with :
2856 distribution : goreleaser
29- version : " ${{ env.GITHUB_REF_NAME }} "
57+ version : " ~> v2 "
3058 args : release --clean
3159 env :
3260 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