feat(ci): auto-create GitHub releases on version bump
Releases now appear in the GitHub sidebar. The release notes are extracted from CHANGELOG.md for the specific version.
This commit is contained in:
parent
b4e86d8bbd
commit
c3385b9d8d
1 changed files with 20 additions and 0 deletions
20
.github/workflows/test-agents.yml
vendored
20
.github/workflows/test-agents.yml
vendored
|
|
@ -252,3 +252,23 @@ jobs:
|
|||
git push origin main --tags
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Create GitHub Release
|
||||
run: |
|
||||
NEW_VERSION=$(cat VERSION)
|
||||
|
||||
# Extract changelog entry for this version
|
||||
RELEASE_NOTES=$(awk '/^## \['"$NEW_VERSION"'\]/{flag=1; next} /^## \[/{flag=0} flag' CHANGELOG.md)
|
||||
|
||||
# If no specific notes found, use commit message
|
||||
if [ -z "$RELEASE_NOTES" ]; then
|
||||
RELEASE_NOTES="Release v$NEW_VERSION"
|
||||
fi
|
||||
|
||||
# Create the release
|
||||
gh release create "v$NEW_VERSION" \
|
||||
--title "v$NEW_VERSION" \
|
||||
--notes "$RELEASE_NOTES" \
|
||||
--latest
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
|
|||
Loading…
Reference in a new issue