Skip to content

Commit

Permalink
Add all necessary components for gpg signed release manifests
Browse files Browse the repository at this point in the history
  • Loading branch information
wbobeirne committed Dec 18, 2021
1 parent 0eb99b6 commit 02ca806
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 5 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,16 @@ jobs:
release_name: ${{ github.ref }}
draft: true
prerelease: true
body: |
## Release Notes
<!-- Release notes here -->
## Verify Release
<!-- Make sure you upload gpg signature before releasing! -->
See https://github.com/joule-labs/joule-extension/tree/develop/docs/verify.md
- name: Download extension build zip artifact
uses: actions/download-artifact@v2
Expand Down Expand Up @@ -85,5 +95,5 @@ jobs:
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./manifest.txt
asset_name: manifest.txt
asset_name: manifest-${{ github.ref_name }}.txt
asset_content_type: text/plain
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,18 @@ To make a production build, follow these steps

## Releasing

1. Bump the version number in `package.json` and `static/manifest.json`
1. Bump the version number in `package.json` and `static/manifest.json` and commit it to develop
2. Create a git tag called `v${version}` and push it
3. Run a build
4. Make a new Github release, upload the build assets, write a changelog
5. Upload the built zip to the Chrome developer dashboard, Firefox addons site, and Opera addons site
3. CI will make a release with the assets uploaded and place it in draft
4. Build the release locally with Docker and sign the manifest with
```sh
yarn build:docker && cd dist-docker && gpg --output manifest-[version].wbobeirne.sig --detach-sig manifest.txt
```
5. Download the `manifest-[version].txt` from the release and verify it with the signature you just made
```sh
gpg --verify manifest-[version].wbobeirne.sig manifest-[version].txt
```
6. Upload the built zip to the Chrome developer dashboard + Firefox addons site

## Testing

Expand Down
26 changes: 26 additions & 0 deletions docs/verify.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Verify Releases

To verify the release, you can check @wbobeirne's signature against the sha256 manifest file. First import the public key:

```sh
curl https://raw.githubusercontent.com/joule-labs/joule-extension/master/keys/wbobeirne.asc | gpg --import
```

Download the manifest and sig file and verify it:

```sh
gpg --verify manifest-[version].wbobeirne.sig manifest-[version].txt
```

Now that we have a verified manifest, we'll verify the contents of the zip file. Download and unzip the zip file, and run `sha256sum -c` against the manifest.

```sh
cd joule-[version]
sha256sum -c ../manifest-[version].txt --ignore-missing
```

You should see a series of files and `OK` next to them if the hashes match.

## Build & verify with docker

You can also build your own release and manifest with `yarn build:docker`, then verify the sha256sums using the `manifest.txt` file in `docker-dist/manifest.txt`
52 changes: 52 additions & 0 deletions keys/wbobeirne.asc
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----

mQINBGDKfggBEAD0IR5BO+BOhHFRE+OKOrvkXH9qlbXC1id69A0L9XpcCqJtULvQ
tAI7rV/uQQvt/ijGsJuImmq9B6LfWO2ngbz0IFwEcSwBPfbfrFqONRH5xYIsimFa
N81ngeXlZjE5XleuJKtw8WsYrh1H/nyIPTIL7mOTS5jjjBfIXoE/o06Iw0KV2L7v
yY16BfNZGrcEp5ar578O8E6dZRMYMOVd0UMP1ClP/zfszA0pVzJs9FuyxBQlEYFv
VQR0AeSmsywH2guMq2pK6jZI8aOShmoIIYgfPgnX89KvvwZyiW3mexf2+2fqoQOS
TAswXFkAEfsGEtZIgxvvNCrFBUR0BUBNX0xeeRrWfiUG+dveBiZ3HVQP3DLWldQ0
Iy8yH5CLDvz5rKELeuVt886JuvPXgVQpcQbetc103Fz3sGV9WXlRxF6L5hoaD6jU
4iMxVgARSOWgDQRIw4cLA6Ya9/qGKSu4yQVjjdWiK28knYF9LexJ4MOVE3Q7vlBV
sZGaOdUAO4tzNAOidBbG8EvrLiwxJm5aCeadTV6gYhH5MVUlY8Uiyk+Lew9QO3mx
ZweBt6J+EnZHlOQeXywn0jrzRHfE6WmvWHVEk3LV2D0w0ndKjwjGgZlWzP76o0+M
ALMty6/8//Ux0ThnYwzSufoEn6bbERNBjJtKiFsD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