Skip to content
Merged
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
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,36 @@ jobs:
fi
echo "Tag ${GITHUB_REF_NAME} matches packaged version ${built}."
- run: uv publish --trusted-publishing always

github-release:
needs: publish
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v5
# CHANGELOG.md is the single source of truth for release notes, so
# extract this tag's own section rather than maintaining a second
# copy anywhere. A missing section fails loudly instead of
# publishing an empty-body release.
- name: Extract this version's CHANGELOG section
run: |
set -euo pipefail
version="${GITHUB_REF_NAME#v}"
awk -v ver="$version" '
found && /^## \[/ { exit }
found { print }
$0 ~ "^## \\[" ver "\\]" { found=1 }
' CHANGELOG.md > release-notes.md
if [ ! -s release-notes.md ]; then
echo "::error::No '## [${version}]' section found in CHANGELOG.md."
exit 1
fi
- name: Create GitHub release
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
gh release create "${GITHUB_REF_NAME}" \
--title "netprotocols ${GITHUB_REF_NAME#v}" \
--notes-file release-notes.md \
--latest
Loading