Skip to content

Commit

Permalink
Use minisign instead of gpg for signing CI artifacts (attempt 2)
Browse files Browse the repository at this point in the history
  • Loading branch information
avh4 committed Feb 26, 2023
1 parent 1032fbe commit c63cbc8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 3 additions & 1 deletion .github/actions/release-artifact/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ runs:
- name: Sign artifacts
shell: bash
run: |
echo "$MINISIGN_PRIVATE_KEY" > private.key
echo "$MINISIGN_PRIVATE_KEY" | base64 --decode > private.key
chmod 400 private.key
for i in dist/*; do
echo "Signing $i"
minisign -S -s private.key -t "$GITHUB_WORKFLOW_REF $GITHUB_RUN_ID $GITHUB_RUN_ATTEMPT" -m "$i"
done
rm -v private.key
Expand Down
7 changes: 3 additions & 4 deletions dev/Documentation/Signatures.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@ to verify the downloaded binaries before publishing.
1. Remove the old key:
- `rm ./keys/github-actions.pub`
1. Create the new key:
- `minisign -G -s ./XXX_NEW_PRIVATE_KEY -p ./keys/github-actions.pub`
- Leave the password blank
- `minisign -G -W -s ./XXX_NEW_PRIVATE_KEY -p ./keys/github-actions.pub`
1. Get the private key:
- `cat ./XXX_NEW_PRIVATE_KEY`
- `cat ./XXX_NEW_PRIVATE_KEY | base64`
- Copy the result as the value of `MINISIGN_PRIVATE_KEY` at <https://github.com/avh4/elm-format/settings/secrets/actions>
1. Securely delete the private key:
- `shred -vz XXX_NEW_PRIVATE_KEY`
- `shred -uvz XXX_NEW_PRIVATE_KEY`
1. Check in the changes to `./keys/github-actions.pub`
1. Push to a branch whose name starts with "release/" to trigger the Build Release workflows, and make sure they succeed.
4 changes: 2 additions & 2 deletions keys/github-actions.pub
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
untrusted comment: minisign public key 193A5479E5DAC8ED
RWTtyNrleVQ6GQ8+wXDd8nr5i37IiU1dozzDpR0F+CYqkZDwh/BxXu9u
untrusted comment: minisign public key AD7B120324D7931C
RWQck9ckAxJ7rR33f9wfM1h4lDzf9etWvDW7jBZUNUhIJ/PPoSN2K1Q9

0 comments on commit c63cbc8

Please sign in to comment.