refactor: add GPG private key to release workflow for enhanced security
This commit is contained in:
8
.github/workflows/release.yaml
vendored
8
.github/workflows/release.yaml
vendored
@@ -17,10 +17,16 @@ on:
|
||||
BOT_TOKEN:
|
||||
required: true
|
||||
description: "Nexim Bot token"
|
||||
GPG_PRIVATE_KEY:
|
||||
required: true
|
||||
description: "GPG private key"
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
env:
|
||||
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||
|
||||
jobs:
|
||||
main:
|
||||
name: Build & Lint & Test & Release
|
||||
@@ -35,7 +41,7 @@ jobs:
|
||||
|
||||
- name: 🙂↔️ Import GPG key
|
||||
run: |
|
||||
echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --batch --import
|
||||
echo "${{ env.GPG_PRIVATE_KEY }}" | gpg --batch --import
|
||||
echo -e "5\ny\n" | gpg --batch --yes --command-fd 0 --edit-key ${{ secrets.GPG_KEY_ID }} trust quit
|
||||
env:
|
||||
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY}}
|
||||
|
||||
Reference in New Issue
Block a user