aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2024-04-24 02:36:01 +0100
committerLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2024-04-24 03:46:58 +0100
commitf7dd8f88f0f527fc28be77e9bcd937fc484573e8 (patch)
tree2d58a3f20a8734aee2884eeb87a58e55ad9754eb
parente510e1cb157bec78ffb5bccdabb4b33e7d507d3d (diff)
downloadsentrum-f7dd8f88f0f527fc28be77e9bcd937fc484573e8.tar.gz
sentrum-f7dd8f88f0f527fc28be77e9bcd937fc484573e8.tar.bz2
sentrum-f7dd8f88f0f527fc28be77e9bcd937fc484573e8.zip
Automatically generate changelog on release
-rw-r--r--.github/workflows/release.yml4
-rwxr-xr-xutils/generate_changelog.sh26
2 files changed, 29 insertions, 1 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 8ea5f7a..f02db1b 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -36,11 +36,13 @@ jobs:
else
tar czvf ${{ matrix.name }} target/release/${{ matrix.bin }} sentrum.sample.toml contrib/sentrum.service
fi
+ - name: Generate Changelog
+ run: utils/generate_changelog.sh ${{ github.ref_name }} > ${{ github.workspace }}-CHANGELOG.md
- name: Publish
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
- body_path: docs/CHANGELOG.md
+ body_path: ${{ github.workspace }}-CHANGELOG.md
draft: true
fail_on_unmatched_files: true
files: sentrum-*
diff --git a/utils/generate_changelog.sh b/utils/generate_changelog.sh
new file mode 100755
index 0000000..05e7e9e
--- /dev/null
+++ b/utils/generate_changelog.sh
@@ -0,0 +1,26 @@
+#|/usr/bin/env sh
+
+script_dir=$(dirname -- "$(readlink -f "$0")")
+
+sed '/^$/q' "$script_dir"/../docs/CHANGELOG.md
+
+echo '## Verifying the release
+
+0. Import my gpg public key into your keyring (you only need to do this once, not for every release):
+
+```bash
+gpg --auto-key-locate clear,wkd --locate-keys sommerfeld@sommerfeld.dev
+```
+
+1. Download `sentrum-%s-manifest.txt` and `sentrum-%s-manifest.txt.asc` to the same directory where you are downloading the binary.
+2. Verify the gpg signature is mine (should ouput `Good signature`)`:
+
+```bash
+gpg --verify sentrum-%s-manifest.txt.asc
+```
+
+3. Verify the checksums of the binaries (should output `OK`):
+
+```bash
+sha256sum --check --ignore-missing sentrum-%s-manifest.txt
+```' | sed "s/%s/$1/g"