Skip to content

Commit a8635d5

Browse files
authored
Add public key to release assets for offline verification (#1009)
Signed-off-by: yxxhero <aiopsclub@163.com>
1 parent 63d171b commit a8635d5

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

.github/workflows/release.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,14 @@ jobs:
6666
args: release --clean ${{ env.flags }}
6767
env:
6868
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69+
-
70+
name: Export and upload public key
71+
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
72+
run: |
73+
gpg --export --armor "${{ secrets.GPG_FINGERPRINT }}" > pubkey.asc
74+
gh release upload ${{ github.ref_name }} pubkey.asc
75+
env:
76+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6977

7078
provenance-smoke-test:
7179
runs-on: ubuntu-latest

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ helm plugin install https://github.com/databus23/helm-diff/releases/latest/downl
5353
For offline/airgapped environments, download the public key from the GitHub release assets on a connected machine, transfer it, and import it locally:
5454
5555
```shell
56-
gpg --import <public-key.asc>
56+
curl -sL https://github.com/databus23/helm-diff/releases/latest/download/pubkey.asc -o pubkey.asc
57+
gpg --import pubkey.asc
5758
```
5859
5960
The public key fingerprint is published in the notes for each GitHub release.

0 commit comments

Comments
 (0)