mirror of
https://github.com/Kori1c/ecs-controller.git
synced 2026-06-06 16:49:30 +08:00
Improve auto-release to include commit notes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
16
.github/workflows/auto-release.yml
vendored
16
.github/workflows/auto-release.yml
vendored
@@ -37,12 +37,24 @@ jobs:
|
||||
fi
|
||||
echo "tag=$NEXT_TAG" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Generate release notes
|
||||
id: release_notes
|
||||
run: |
|
||||
# Get commit messages since last tag
|
||||
LAST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
|
||||
if [ -z "$LAST_TAG" ]; then
|
||||
NOTES=$(git log --oneline -10)
|
||||
else
|
||||
NOTES=$(git log $LAST_TAG..HEAD --oneline)
|
||||
fi
|
||||
echo "notes=$(echo "$NOTES" | sed 's/^/- /')" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Create or Update Release
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
tag: ${{ steps.generate_tag.outputs.tag }}
|
||||
name: "Release ${{ steps.generate_tag.outputs.tag }}"
|
||||
body: "Auto-generated release for the latest commit."
|
||||
allowUpdates: false
|
||||
body: "${{ steps.release_notes.outputs.notes }}"
|
||||
allowUpdates: true
|
||||
makeLatest: true
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
Reference in New Issue
Block a user