mirror of
https://github.com/yuaotian/go-cursor-help.git
synced 2025-06-08 04:22:06 +08:00
chore: update GitHub Actions workflows to enforce required secrets for release process
- Explicitly defined RELEASE_TOKEN, GPG_PRIVATE_KEY, and PASSPHRASE as required secrets in both auto-tag.yml and release.yml to enhance security. - Updated the release.yml to require a tag input for the release process, ensuring clarity in workflow execution. - Adjusted the GPG key import step to utilize the defined secrets, improving the reliability of the signing process.
This commit is contained in:
parent
9690adf5a4
commit
622f681377
7
.github/workflows/auto-tag.yml
vendored
7
.github/workflows/auto-tag.yml
vendored
@ -51,6 +51,9 @@ jobs:
|
|||||||
needs: auto-tag
|
needs: auto-tag
|
||||||
if: success()
|
if: success()
|
||||||
uses: ./.github/workflows/release.yml
|
uses: ./.github/workflows/release.yml
|
||||||
secrets: inherit
|
|
||||||
with:
|
with:
|
||||||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
|
tag: ${{ needs.auto-tag.outputs.new_tag }}
|
||||||
|
secrets:
|
||||||
|
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||||
|
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||||
|
PASSPHRASE: ${{ secrets.PASSPHRASE }}
|
||||||
|
13
.github/workflows/release.yml
vendored
13
.github/workflows/release.yml
vendored
@ -3,17 +3,17 @@ name: Release
|
|||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
gpg_private_key:
|
tag:
|
||||||
description: "GPG private key to sign releases"
|
description: "The tag to release"
|
||||||
required: false
|
required: true
|
||||||
type: string
|
type: string
|
||||||
secrets:
|
secrets:
|
||||||
RELEASE_TOKEN:
|
RELEASE_TOKEN:
|
||||||
required: true
|
required: true
|
||||||
GPG_PRIVATE_KEY:
|
GPG_PRIVATE_KEY:
|
||||||
required: false
|
required: true
|
||||||
PASSPHRASE:
|
PASSPHRASE:
|
||||||
required: false
|
required: true
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- "v*"
|
- "v*"
|
||||||
@ -40,9 +40,8 @@ jobs:
|
|||||||
- name: Import GPG key
|
- name: Import GPG key
|
||||||
id: import_gpg
|
id: import_gpg
|
||||||
uses: crazy-max/ghaction-import-gpg@v5
|
uses: crazy-max/ghaction-import-gpg@v5
|
||||||
if: inputs.gpg_private_key != ''
|
|
||||||
with:
|
with:
|
||||||
gpg_private_key: ${{ inputs.gpg_private_key }}
|
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||||
passphrase: ${{ secrets.PASSPHRASE }}
|
passphrase: ${{ secrets.PASSPHRASE }}
|
||||||
|
|
||||||
- name: Run GoReleaser
|
- name: Run GoReleaser
|
||||||
|
Loading…
x
Reference in New Issue
Block a user