Skip to content

Commit 38f9b65

Browse files
committed
chore(gh): update releas
- Simplify formatting to align with other provider releases from VMware by Broadcom. - Pin GitHub Actions to release commit SHA. Signed-off-by: Ryan Johnson <ryan.johnson@broadcom.com>
1 parent 29c3d0a commit 38f9b65

File tree

2 files changed

+27
-50
lines changed

2 files changed

+27
-50
lines changed

.github/workflows/release.yml

+15-38
Original file line numberDiff line numberDiff line change
@@ -5,55 +5,32 @@ on:
55
tags:
66
- 'v*'
77

8-
env:
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'
8+
permissions:
9+
contents: write
1010

1111
jobs:
1212
goreleaser:
1313
runs-on: ubuntu-latest
1414
steps:
15-
-
16-
name: Checkout
17-
uses: actions/checkout@v4
15+
- name: Checkout Repository
16+
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
1817
with:
1918
fetch-depth: 0
20-
-
21-
name: Set up Go
22-
uses: actions/setup-go@v5
19+
- name: Setup Go
20+
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
2321
with:
24-
go-version: 1.19
25-
-
26-
name: golangci-lint
27-
uses: golangci/golangci-lint-action@v6
28-
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
22+
go-version-file: 'go.mod'
23+
- name: Import GPG Key
4624
id: import_gpg
47-
uses: crazy-max/ghaction-import-gpg@v2
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
25+
uses: crazy-max/ghaction-import-gpg@01dd5d3ca463c7f10f7f4f7b4f177225ac661ee4 # v6.1.0
26+
with:
27+
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY2 }}
28+
passphrase: ${{ secrets.GPG_PASSPHRASE2 }}
29+
- name: Run GoReleaser
30+
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0
5431
with:
5532
version: latest
56-
args: release --rm-dist --release-header .goreleaser.tmpl
33+
args: release --clean --timeout 60m --release-header-tmpl .goreleaser.tmpl
5734
env:
5835
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5936
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}

.goreleaser.yml

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Visit https://goreleaser.com for documentation on how to customize this
2-
# behavior.
1+
version: 2
2+
33
before:
44
hooks:
55
# this is just an example and not a requirement for provider building/publishing
@@ -33,12 +33,15 @@ archives:
3333
- format: zip
3434
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
3535
checksum:
36+
extra_files:
37+
- glob: 'terraform-registry-manifest.json'
38+
name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json'
3639
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
3740
algorithm: sha256
3841
signs:
3942
- artifacts: checksum
4043
args:
41-
# if you are using this is a GitHub action or some other automated pipeline, you
44+
# if you are using this in a GitHub action or some other automated pipeline, you
4245
# need to pass the batch flag to indicate its not interactive.
4346
- "--batch"
4447
- "--local-user"
@@ -48,13 +51,10 @@ signs:
4851
- "--detach-sign"
4952
- "${artifact}"
5053
release:
51-
# Visit your project's GitHub Releases page to publish this release.
52-
draft: true
54+
extra_files:
55+
- glob: 'terraform-registry-manifest.json'
56+
name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json'
57+
# If you want to manually examine the release before its live, uncomment this line:
58+
# draft: true
5359
changelog:
54-
filters:
55-
exclude:
56-
- '^docs:'
57-
- '^test:'
58-
- Merge pull request
59-
- Merge branch
60-
- go mod tidy
60+
disable: true

0 commit comments

Comments
 (0)