mirror of
https://github.com/0PandaDEV/Qopy.git
synced 2025-04-22 05:34:04 +02:00
fix(release): enhance changelog generation to handle missing tags
This commit is contained in:
parent
dc34912895
commit
1417d35cd7
1 changed files with 12 additions and 6 deletions
18
.github/workflows/release.yml
vendored
18
.github/workflows/release.yml
vendored
|
@ -243,12 +243,18 @@ jobs:
|
||||||
id: release_body
|
id: release_body
|
||||||
run: |
|
run: |
|
||||||
VERSION="${{ needs.prepare.outputs.version }}"
|
VERSION="${{ needs.prepare.outputs.version }}"
|
||||||
echo "Debug: Listing tags"
|
|
||||||
git tag -l
|
# Get the most recent release tag (v* tags only)
|
||||||
echo "Debug: Getting latest tag"
|
LAST_TAG=$(git describe --match "v*" --abbrev=0 --tags `git rev-list --tags --skip=1 --max-count=1` 2>/dev/null || echo "")
|
||||||
git describe --tags --abbrev=0 || echo "No tags found"
|
|
||||||
echo "Debug: Generating changelog"
|
if [ -n "$LAST_TAG" ]; then
|
||||||
CHANGES=$(git log "$(git describe --tags --abbrev=0 2>/dev/null || echo HEAD^)" HEAD --pretty=format:"- %s" || echo "No changelog available")
|
echo "Debug: Found last release tag: $LAST_TAG"
|
||||||
|
CHANGES=$(git log ${LAST_TAG}..HEAD --pretty=format:"- %s")
|
||||||
|
else
|
||||||
|
echo "Debug: No previous release tag found, using first commit"
|
||||||
|
CHANGES=$(git log --pretty=format:"- %s")
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Debug: Changelog content:"
|
echo "Debug: Changelog content:"
|
||||||
echo "$CHANGES"
|
echo "$CHANGES"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue