Skip to content

Commit

Permalink
Update release.yml
Browse files Browse the repository at this point in the history
Use go 1.21.

Update actions' versions
  • Loading branch information
alexhung authored Mar 13, 2024
1 parent 3b47132 commit 6529c0f
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This GitHub action can publish assets for release when a tag is created.
# Currently its setup to run on any tag that matches the pattern "v*" (ie. v0.1.0).
#
# This uses an action (hashicorp/ghaction-import-gpg) that assumes you set your
# This uses an action (paultyng/ghaction-import-gpg) that assumes you set your
# private key in the `GPG_PRIVATE_KEY` secret and passphrase in the `PASSPHRASE`
# secret. If you would rather own your own GPG handling, please fork this action
# or use an alternative one for key handling.
Expand All @@ -13,22 +13,25 @@ name: release
on:
push:
tags:
- 'v*'
- v*
jobs:
goreleaser:
runs-on: ubuntu-latest
if: |
(startsWith(github.ref, 'refs/tags/') && github.event.base_ref == 'refs/heads/master')
|| (startsWith(github.ref, 'refs/tags/') && github.event.base_ref == 'refs/heads/v6')
steps:
-
name: Checkout
uses: actions/checkout@v2.4.0
uses: actions/checkout@v3
-
name: Unshallow
run: git fetch --prune --unshallow
-
name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.21
-
name: Import GPG key
id: import_gpg
Expand All @@ -38,11 +41,10 @@ jobs:
passphrase: ${{ secrets.PASSPHRASE }}
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2.8.0
uses: goreleaser/goreleaser-action@v4
with:
version: latest
args: release --rm-dist
version: ${{ github.event.inputs.tag }}
args: release --clean
env:
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
# GitHub sets this automatically
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 6529c0f

Please sign in to comment.