Skip to content

Commit c63cbc8

Browse files
committed
Use minisign instead of gpg for signing CI artifacts (attempt 2)
1 parent 1032fbe commit c63cbc8

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

.github/actions/release-artifact/action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ runs:
2424
- name: Sign artifacts
2525
shell: bash
2626
run: |
27-
echo "$MINISIGN_PRIVATE_KEY" > private.key
27+
echo "$MINISIGN_PRIVATE_KEY" | base64 --decode > private.key
28+
chmod 400 private.key
2829
for i in dist/*; do
30+
echo "Signing $i"
2931
minisign -S -s private.key -t "$GITHUB_WORKFLOW_REF $GITHUB_RUN_ID $GITHUB_RUN_ATTEMPT" -m "$i"
3032
done
3133
rm -v private.key

dev/Documentation/Signatures.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,11 @@ to verify the downloaded binaries before publishing.
1515
1. Remove the old key:
1616
- `rm ./keys/github-actions.pub`
1717
1. Create the new key:
18-
- `minisign -G -s ./XXX_NEW_PRIVATE_KEY -p ./keys/github-actions.pub`
19-
- Leave the password blank
18+
- `minisign -G -W -s ./XXX_NEW_PRIVATE_KEY -p ./keys/github-actions.pub`
2019
1. Get the private key:
21-
- `cat ./XXX_NEW_PRIVATE_KEY`
20+
- `cat ./XXX_NEW_PRIVATE_KEY | base64`
2221
- Copy the result as the value of `MINISIGN_PRIVATE_KEY` at <https://github.com/avh4/elm-format/settings/secrets/actions>
2322
1. Securely delete the private key:
24-
- `shred -vz XXX_NEW_PRIVATE_KEY`
23+
- `shred -uvz XXX_NEW_PRIVATE_KEY`
2524
1. Check in the changes to `./keys/github-actions.pub`
2625
1. Push to a branch whose name starts with "release/" to trigger the Build Release workflows, and make sure they succeed.

keys/github-actions.pub

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
untrusted comment: minisign public key 193A5479E5DAC8ED
2-
RWTtyNrleVQ6GQ8+wXDd8nr5i37IiU1dozzDpR0F+CYqkZDwh/BxXu9u
1+
untrusted comment: minisign public key AD7B120324D7931C
2+
RWQck9ckAxJ7rR33f9wfM1h4lDzf9etWvDW7jBZUNUhIJ/PPoSN2K1Q9

0 commit comments

Comments
 (0)