Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ jobs:
echo "invalid release tag: ${tag}" >&2
exit 1
fi
if [[ "$(git cat-file -t "${tag}")" != "tag" ]]; then
echo "release tag must be annotated: ${tag}" >&2
exit 1
fi
version="$(sed -n 's/^version = "\([^"]*\)"/\1/p' Cargo.toml | head -n 1)"
if [[ "v${version}" != "${tag}" ]]; then
echo "Cargo version ${version} does not match tag ${tag}" >&2
Expand Down Expand Up @@ -112,6 +116,12 @@ jobs:
run: |
set -euo pipefail
sort -k2 dist/*.sha256 > dist/SHA256SUMS
git for-each-ref --format='%(contents)' \
"refs/tags/${GITHUB_REF_NAME}" > dist/RELEASE_NOTES.md
Comment on lines +119 to +120

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid publishing tag signatures as release notes

When a maintainer uses a signed annotated release tag, %(contents) writes the complete tag contents into dist/RELEASE_NOTES.md, including the embedded PGP signature; Git documents contents as the complete message and exposes the signature separately as contents:signature (git-for-each-ref). That means the next signed release would publish a long -----BEGIN PGP SIGNATURE----- block in the GitHub release notes, even though the release policy still allows signed tags; please format the file from the subject/body atoms instead of the full contents.

Useful? React with 👍 / 👎.

if [[ ! -s dist/RELEASE_NOTES.md ]]; then
echo "annotated tag has no release notes: ${GITHUB_REF_NAME}" >&2
exit 1
fi
prerelease=()
if [[ "${GITHUB_REF_NAME}" == *-* ]]; then
prerelease+=(--prerelease)
Expand All @@ -121,5 +131,5 @@ jobs:
--repo "${GITHUB_REPOSITORY}" \
--verify-tag \
--title "FTWDB ${GITHUB_REF_NAME}" \
--notes-from-tag \
--notes-file dist/RELEASE_NOTES.md \
"${prerelease[@]}"
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ steps in [docs/releases.md](docs/releases.md).

## [Unreleased]

### Fixed

- Release publication now reads notes from the annotated tag through a file,
which works with an explicit GitHub repository target.

## [0.1.0-alpha.1] - 2026-07-21

First public evaluation release.
Expand Down
3 changes: 2 additions & 1 deletion docs/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ remove exposed secrets or meet a legal requirement, and record that event.

Pushing a matching tag starts `.github/workflows/release.yml`. The workflow:

1. checks the tag syntax and exact Cargo/changelog version;
1. checks that the tag is annotated and matches the exact Cargo/changelog
version;
2. repeats the release test and package checks;
3. builds native `ftw` archives on GitHub's Linux and macOS runners;
4. creates `SHA256SUMS` for the archives; and
Expand Down