@@ -3,57 +3,37 @@ name: Release
33on :
44 push :
55 tags :
6- - ' v* '
6+ - " v* "
77
88env :
9- BUILD_TAGS : ' akscluster cluster clustergroup credential ekscluster gitrepository iampolicy kustomization namespace custompolicy imagepolicy networkpolicy quotapolicy securitypolicy sourcesecret workspace tanzupackage tanzupackages packagerepository packageinstall clustersecret integration mutationpolicy backupschedule targetlocation dataprotection tanzukubernetescluster clusterclass managementcluster provisioner inspections custompolicytemplate customiamrole permissiontemplate'
9+ BUILD_TAGS : " akscluster cluster clustergroup credential ekscluster gitrepository iampolicy kustomization namespace custompolicy imagepolicy networkpolicy quotapolicy securitypolicy sourcesecret workspace tanzupackage tanzupackages packagerepository packageinstall clustersecret integration mutationpolicy backupschedule targetlocation dataprotection tanzukubernetescluster clusterclass managementcluster provisioner inspections custompolicytemplate customiamrole permissiontemplate"
10+
11+ permissions :
12+ contents : write
1013
1114jobs :
1215 goreleaser :
1316 runs-on : ubuntu-latest
1417 steps :
15- -
16- name : Checkout
17- uses : actions/checkout@v4
18+ - name : Checkout Repository
19+ uses : actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
1820 with :
1921 fetch-depth : 0
20- -
21- name : Set up Go
22- uses : actions/setup-go@v5
23- with :
24- go-version : 1.19
25- -
26- name : golangci-lint
27- uses : golangci/golangci-lint-action@v6
22+ - name : Setup Go
23+ uses : actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
2824 with :
29- version : v1.48.0
30- args : --issues-exit-code=1
31- skip-pkg-cache : true
32- skip-build-cache : true
33-
34- -
35- name : unit-test
36- run : |
37- go test -v ./... -cover
38-
39- -
40- name : mock-test
41- run : |
42- go test -v ./... -tags $BUILD_TAGS
43-
44- -
45- name : Import GPG key
25+ go-version-file : " go.mod"
26+ - name : Import GPG Key
4627 id : import_gpg
47- uses : crazy-max/ghaction-import-gpg@v6
48- env :
49- GPG_PRIVATE_KEY : ${{ secrets.GPG_PRIVATE_KEY }}
50- PASSPHRASE : ${{ secrets.GPG_PASSPHRASE }}
51- -
52- name : Run GoReleaser
53- uses : goreleaser/goreleaser-action@v2
28+ uses : crazy-max/ghaction-import-gpg@01dd5d3ca463c7f10f7f4f7b4f177225ac661ee4 # v6.1.0
29+ with :
30+ gpg_private_key : ${{ secrets.GPG_PRIVATE_KEY }}
31+ passphrase : ${{ secrets.GPG_PASSPHRASE }}
32+ - name : Run GoReleaser
33+ uses : goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0
5434 with :
5535 version : latest
56- args : release --rm-dist --release-header .goreleaser.tmpl
36+ args : release --clean --timeout 60m --release-header-tmpl .goreleaser.tmpl
5737 env :
5838 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5939 GPG_FINGERPRINT : ${{ steps.import_gpg.outputs.fingerprint }}
0 commit comments