Skip to content

Commit a3a108e

Browse files
authored
Merge pull request #93 from bgpat/fix-release-workflow
Fix release workflow
2 parents 9de0e12 + ee89f37 commit a3a108e

File tree

3 files changed

+11
-15
lines changed

3 files changed

+11
-15
lines changed

.github/workflows/release.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# This GitHub action can publish assets for release when a tag is created.
22
# Currently its setup to run on any tag that matches the pattern "v*" (ie. v0.1.0).
33
#
4-
# This uses an action (paultyng/ghaction-import-gpg) that assumes you set your
5-
# private key in the `GPG_PRIVATE_KEY` secret and passphrase in the `PASSPHRASE`
4+
# This uses an action (crazy-max/ghaction-import-gpg) that assumes you set your
5+
# private key in the `gpg_private_key` secret and passphrase in the `passphrase`
66
# secret. If you would rather own your own GPG handling, please fork this action
77
# or use an alternative one for key handling.
88
#
@@ -16,6 +16,8 @@ on:
1616
- 'v*'
1717
release:
1818
types: [released]
19+
permissions:
20+
contents: write
1921
jobs:
2022
goreleaser:
2123
runs-on: ubuntu-latest
@@ -26,22 +28,19 @@ jobs:
2628
-
2729
name: Unshallow
2830
run: git fetch --prune --unshallow
29-
-
30-
name: Go Version
31-
id: go-version
32-
run: echo "::set-output name=version=$(cat .go-version)"
3331
-
3432
name: Set up Go
3533
uses: actions/setup-go@v3
3634
with:
37-
go-version: ${{ steps.go-version.outputs.version }}
35+
go-version-file: go.mod
36+
cache: true
3837
-
3938
name: Import GPG key
4039
id: import_gpg
41-
uses: paultyng/ghaction-import-gpg@v2.1.0
40+
uses: crazy-max/ghaction-import-gpg@v5
4241
env:
43-
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
44-
PASSPHRASE: ${{ secrets.PASSPHRASE }}
42+
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
43+
passphrase: ${{ secrets.PASSPHRASE }}
4544
-
4645
name: Run GoReleaser
4746
uses: goreleaser/goreleaser-action@v4

.github/workflows/test.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,10 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@v3
16-
- name: Go Version
17-
id: go-version
18-
run: echo "::set-output name=version::$(cat .go-version)"
1916
- uses: actions/setup-go@v3
2017
with:
21-
go-version: ${{ steps.go-version.outputs.version }}
18+
go-version-file: go.mod
19+
cache: true
2220
- run: go test ./...
2321
env:
2422
TF_ACC: "true"

.go-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)