煎饼果子卷鲨鱼辣椒 e0db041e93 chore: enhance GoReleaser configuration and GitHub Actions workflows for GPG signing
- Added GPG signing configuration to .goreleaser.yml to support artifact signing.
- Updated auto-tag.yml and release.yml to include necessary secrets for GPG signing, enhancing security and functionality.
- Ensured that GPG keys and passphrase are conditionally utilized in the release process.
2024-12-30 18:10:00 +08:00

59 lines
1.3 KiB
YAML

name: Release
on:
workflow_call:
secrets:
RELEASE_TOKEN:
required: true
GPG_PRIVATE_KEY:
required: false
PASSPHRASE:
required: false
push:
tags:
- "v*"
permissions: write-all
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
lfs: true
submodules: recursive
- name: Debug Files
run: |
pwd
ls -la
echo "Current directory contents:"
ls -R
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.21"
cache: true
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
if: ${{ secrets.GPG_PRIVATE_KEY != '' }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: v1.21.2
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}