Skip to content

Commit

Permalink
署名のワークフロー設定
Browse files Browse the repository at this point in the history
  • Loading branch information
uchijo committed Oct 25, 2023
1 parent 3050562 commit c9d9f18
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/gorelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: goreleaser
on:
push:
tags:
- '*'
- "*"

permissions:
contents: write
Expand All @@ -12,16 +12,19 @@ jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
-
name: Set up Go
- name: Set up Go
uses: actions/setup-go@v4
-
name: Run GoReleaser
- name: "Import GPG key"
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
Expand All @@ -30,5 +33,6 @@ jobs:
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
4 changes: 4 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ builds:
- windows
- darwin

signs:
- artifacts: checksum
args: ["--batch", "-u", "{{ .Env.GPG_FINGERPRINT }}", "--output", "${signature}", "--detach-sign", "${artifact}"]

archives:
- format: tar.gz
# this name template makes the OS and Arch compatible with the results of `uname`.
Expand Down

0 comments on commit c9d9f18

Please sign in to comment.