Skip to content

Commit

Permalink
Update github actions.
Browse files Browse the repository at this point in the history
Signed-off-by: Brendan Winter <bwinter@vmware.com>
  • Loading branch information
bwinter committed Oct 18, 2023
1 parent aa9a262 commit 17f4501
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
go: [ "1.19.x", "1.20.x", "1.21.x" ]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ jobs:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with: # Required: the version of golangci-lint is required and must be specified without a patch version:
# we always use the latest patch version.
version: v1.52
version: v1.54
# Optional: if set to `true` then the all caching functionality will be complete disabled,
# takes precedence over all other caching options.
skip-cache: true
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,20 @@ jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Go
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 1.21
go-version-file: 'go.mod'

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with: # Required: the version of golangci-lint is required and must be specified without a patch version:
# we always use the latest patch version.
version: v1.52
version: v1.54
# Optional: if set to `true` then the all caching functionality will be complete disabled,
# takes precedence over all other caching options.
skip-cache: true
Expand All @@ -38,13 +37,16 @@ jobs:

- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v5
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}

- name: List keys
run: gpg -K

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --clean
Expand Down
11 changes: 7 additions & 4 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,23 @@ run:
linters:
disable-all: true
enable:
- durationcheck
- errcheck
# - gofmt
- exportloopref
- gofmt
- goimports
- unused
- gosimple
- govet
- ineffassign
- nakedret
- makezero
- misspell
- nakedret
- revive
- staticcheck
- tenv
- typecheck
- unused
- unconvert
- unused
- vet
- vetshadow

Expand Down
9 changes: 8 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ archives:
- format: zip
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
checksum:
extra_files:
- glob: 'terraform-registry-manifest.json'
name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json'
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
algorithm: sha256
signs:
Expand All @@ -44,7 +47,11 @@ signs:
- "${signature}"
- "--detach-sign"
- "${artifact}"
release: # Visit your project's GitHub Releases page to publish this release.
release:
extra_files:
- glob: 'terraform-registry-manifest.json'
name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json'
# Visit your project's GitHub Releases page to publish this release.
draft: true
changelog:
filters:
Expand Down
6 changes: 6 additions & 0 deletions terraform-registry-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"version": 1,
"metadata": {
"protocol_versions": ["6.0"]
}
}

0 comments on commit 17f4501

Please sign in to comment.