Browse Source

chore: update GitHub Actions workflows to latest action versions and enhance release configuration

- Upgraded checkout action from v3 to v4 in both auto-tag.yml and release.yml for improved performance.
- Added optional input for GPG private key in release.yml to support signing releases.
- Updated setup-go action from v4 to v5 and goreleaser action from v4 to v5, ensuring compatibility with the latest features.
- Changed GoReleaser version specification to 'latest' for automatic updates.
pull/122/head
煎饼果子卷鲨鱼辣椒 5 months ago
parent
commit
a8765f85a7
  1. 2
      .github/workflows/auto-tag.yml
  2. 15
      .github/workflows/release.yml

2
.github/workflows/auto-tag.yml

@ -18,7 +18,7 @@ jobs:
outputs:
new_tag: ${{ steps.get_latest_tag.outputs.version }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

15
.github/workflows/release.yml

@ -2,6 +2,11 @@ name: Release
on:
workflow_call:
inputs:
gpg_private_key:
description: "GPG private key to sign releases"
required: false
type: string
secrets:
RELEASE_TOKEN:
required: true
@ -20,31 +25,31 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
submodules: recursive
- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: "1.21"
cache: true
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v5
uses: crazy-max/ghaction-import-gpg@v6
if: "${{ secrets.GPG_PRIVATE_KEY != '' }}"
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: v1.21.2
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}

Loading…
Cancel
Save