chore: use GPG for signing release

This commit is contained in:
Mateusz Filipowicz
2025-02-09 10:34:14 +01:00
parent 1b3d2a51d8
commit 32f8cbf789
2 changed files with 15 additions and 9 deletions

View File

@@ -1,21 +1,27 @@
--- ---
name: 'Release' name: "Release"
on: on:
push: push:
tags: tags:
- 'v*' - "v*"
jobs: jobs:
goreleaser: goreleaser:
runs-on: 'ubuntu-latest' runs-on: "ubuntu-latest"
permissions: permissions:
contents: "write" contents: "write"
steps: steps:
- uses: 'actions/checkout@v4' - uses: "actions/checkout@v4"
with: with:
fetch-depth: 0 fetch-depth: 0
- uses: 'actions/setup-go@v5' - name: "Import GPG key"
- uses: 'goreleaser/goreleaser-action@v6' id: "import_gpg"
uses: "crazy-max/ghaction-import-gpg@v6"
with: with:
args: 'release --clean' gpg_private_key: "${{ secrets.GPG_PRIVATE_KEY }}"
- uses: "actions/setup-go@v5"
- uses: "goreleaser/goreleaser-action@v6"
with:
args: "release --clean"
env: env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' GPG_FINGERPRINT: "${{ steps.import_gpg.outputs.fingerprint }}"
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

View File

@@ -8,4 +8,4 @@ builds:
- skip: true - skip: true
changelog: changelog:
use: github use: "github"