Skip to content

Commit

Permalink
automate release with Exoscale Tooling GPG key
Browse files Browse the repository at this point in the history
  • Loading branch information
sauterp committed Sep 11, 2023
1 parent 5dc3fd5 commit 1261668
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 2 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: release

on:
push:
tags:
- 'v[0-9]+\.[0-9]+\.[0-9]+'

jobs:
goreleaser:
runs-on: ubuntu-latest

permissions:
contents: write

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- run: git submodule update --init --recursive go.mk
shell: bash

- name: Import GPG key
# This is a third-party GitHub action and we trust it with our GPG key.
# To be on the safer side, we should always pin to the commit SHA.
# It's not a perfect mitigation, but we should always do some due diligence before upgrading.
# The author seems trustworthy, as the author is part of the docker and goreleaser organizations on GitHub.
uses: crazy-max/ghaction-import-gpg@72b6676b71ab476b77e676928516f6982eef7a41
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}

- uses: ./go.mk/.github/actions/release
with:
release_github_token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ checksum:

signs:
- cmd: gpg
args: ["--default-key", "B2DB6B250321137D9DB7210281426F034A3D05F7", "--detach-sign", "${artifact}"]
args: ["--default-key", "7100E8BFD6199CE0374CB7F003686F8CDE378D41", "--detach-sign", "${artifact}"]
artifacts: all

release:
Expand Down
2 changes: 1 addition & 1 deletion go.mk

0 comments on commit 1261668

Please sign in to comment.