From c9d9f18785215234e8a8e7c63d7ed98fe2a9bb79 Mon Sep 17 00:00:00 2001 From: Uchijo Date: Wed, 25 Oct 2023 20:12:28 +0900 Subject: [PATCH] =?UTF-8?q?=E7=BD=B2=E5=90=8D=E3=81=AE=E3=83=AF=E3=83=BC?= =?UTF-8?q?=E3=82=AF=E3=83=95=E3=83=AD=E3=83=BC=E8=A8=AD=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/gorelease.yml | 20 ++++++++++++-------- .goreleaser.yaml | 4 ++++ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/gorelease.yml b/.github/workflows/gorelease.yml index 6cf1d3a..b4d8238 100644 --- a/.github/workflows/gorelease.yml +++ b/.github/workflows/gorelease.yml @@ -3,7 +3,7 @@ name: goreleaser on: push: tags: - - '*' + - "*" permissions: contents: write @@ -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' @@ -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 }} \ No newline at end of file + # GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml index d3fb70f..645340f 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -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`.