mirror of
https://github.com/yuaotian/go-cursor-help.git
synced 2025-06-08 04:22:06 +08:00
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.
This commit is contained in:
parent
dff58fb4fb
commit
e0db041e93
5
.github/workflows/auto-tag.yml
vendored
5
.github/workflows/auto-tag.yml
vendored
@ -51,4 +51,7 @@ jobs:
|
|||||||
needs: auto-tag
|
needs: auto-tag
|
||||||
uses: ./.github/workflows/release.yml
|
uses: ./.github/workflows/release.yml
|
||||||
permissions: write-all
|
permissions: write-all
|
||||||
secrets: inherit
|
secrets:
|
||||||
|
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||||
|
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||||
|
PASSPHRASE: ${{ secrets.PASSPHRASE }}
|
||||||
|
9
.github/workflows/release.yml
vendored
9
.github/workflows/release.yml
vendored
@ -2,6 +2,13 @@ name: Release
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
secrets:
|
||||||
|
RELEASE_TOKEN:
|
||||||
|
required: true
|
||||||
|
GPG_PRIVATE_KEY:
|
||||||
|
required: false
|
||||||
|
PASSPHRASE:
|
||||||
|
required: false
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- "v*"
|
- "v*"
|
||||||
@ -38,7 +45,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
|
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||||
passphrase: ${{ secrets.PASSPHRASE }}
|
passphrase: ${{ secrets.PASSPHRASE }}
|
||||||
if: ${{ env.GPG_PRIVATE_KEY != '' }}
|
if: ${{ secrets.GPG_PRIVATE_KEY != '' }}
|
||||||
|
|
||||||
- name: Run GoReleaser
|
- name: Run GoReleaser
|
||||||
uses: goreleaser/goreleaser-action@v4
|
uses: goreleaser/goreleaser-action@v4
|
||||||
|
@ -95,3 +95,12 @@ release:
|
|||||||
|
|
||||||
snapshot:
|
snapshot:
|
||||||
name_template: "{{ incpatch .Version }}-next"
|
name_template: "{{ incpatch .Version }}-next"
|
||||||
|
|
||||||
|
signs:
|
||||||
|
- cmd: gpg
|
||||||
|
args:
|
||||||
|
- "--output"
|
||||||
|
- "${signature}"
|
||||||
|
- "--detach-sign"
|
||||||
|
- "${artifact}"
|
||||||
|
artifacts: checksum
|
||||||
|
Loading…
x
Reference in New Issue
Block a user