@@ -149,15 +149,19 @@ jobs:
149149 - name : Determine changelog base tag
150150 id : base-tag
151151 run : |
152- # Get current Core version
153- CURRENT_CORE=$(jq -r '.version' UnityProject/Packages/com.jasonxudeveloper.jengine.core/package.json)
152+ # Find the latest existing semantic version tag (e.g., 1.0.5, not v1.0.5)
153+ # Sort by version number and get the latest one
154+ BASE_TAG=$(git tag -l '[0-9]*.[0-9]*.[0-9]*' | sort -V | tail -n 1)
154155
155- # Always use Core version for changelog base (releases follow Core version)
156- # Note: existing tags don't have 'v' prefix (e.g., 1.0.5 not v1.0.5)
157- BASE_TAG="$CURRENT_CORE"
156+ if [ -z "$BASE_TAG" ]; then
157+ echo "Warning: No existing version tags found"
158+ BASE_TAG=""
159+ else
160+ echo "Found latest tag: $BASE_TAG"
161+ fi
158162
159163 echo "base_tag=$BASE_TAG" >> $GITHUB_OUTPUT
160- echo "Using base tag for changelog: $BASE_TAG"
164+ echo "Using base tag for changelog: ${ BASE_TAG:-'(none - will use all commits)'} "
161165
162166 # Generate changelog from conventional commits
163167 - name : Generate changelog
@@ -169,10 +173,11 @@ jobs:
169173 BASE_TAG="${{ steps.base-tag.outputs.base_tag }}"
170174
171175 # Get commits since last tag
172- if git rev-parse "$BASE_TAG" >/dev/null 2>&1; then
173- COMMITS=$(git log $BASE_TAG..HEAD --pretty=format:"%H|%s" --no-merges)
176+ if [ -n "$BASE_TAG" ] && git rev-parse "$BASE_TAG" >/dev/null 2>&1; then
177+ echo "Getting commits since tag: $BASE_TAG"
178+ COMMITS=$(git log ${BASE_TAG}..HEAD --pretty=format:"%H|%s" --no-merges)
174179 else
175- echo "Warning: Tag $BASE_TAG not found , using all commits"
180+ echo "Warning: No valid base tag , using all commits"
176181 COMMITS=$(git log --pretty=format:"%H|%s" --no-merges)
177182 fi
178183
@@ -566,36 +571,38 @@ jobs:
566571 ref : ${{ needs.validate.outputs.release_tag }}
567572
568573 - name : Create GitHub Release
569- uses : actions/create-release@v1
570574 env :
571- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
572- with :
573- tag_name : ${{ needs.validate.outputs.release_tag }}
574- release_name : v${{ needs.validate.outputs.release_tag }}
575- body : |
576- ${{ needs.prepare-release.outputs.changelog }}
575+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
576+ run : |
577+ # Create release body
578+ cat > /tmp/release_body.md << 'RELEASE_EOF'
579+ ${{ needs.prepare-release.outputs.changelog }}
580+
581+ ---
577582
578- ---
583+ ## 📦 Installation
579584
580- ## 📦 Installation
585+ Install via [OpenUPM](https://openupm.com/):
581586
582- Install via [OpenUPM](https://openupm.com/):
587+ ```bash
588+ openupm add com.jasonxudeveloper.jengine.core
589+ openupm add com.jasonxudeveloper.jengine.util
590+ ```
583591
584- ```bash
585- openupm add com.jasonxudeveloper.jengine.core
586- openupm add com.jasonxudeveloper.jengine.util
587- ```
592+ ## 📖 Documentation
588593
589- ## 📖 Documentation
594+ - [English Documentation](https://jengine.xgamedev.net/)
595+ - [中文文档](https://jengine.xgamedev.net/zh/)
590596
591- - [English Documentation](https://jengine.xgamedev.net/)
592- - [中文文档](https://jengine.xgamedev.net/zh/)
597+ ---
593598
594- ---
599+ *This release was automatically created by the JEngine Release Bot*
600+ RELEASE_EOF
595601
596- *This release was automatically created by the JEngine Release Bot*
597- draft : false
598- prerelease : false
602+ # Create the release using gh CLI (no deprecated set-output)
603+ gh release create "${{ needs.validate.outputs.release_tag }}" \
604+ --title "v${{ needs.validate.outputs.release_tag }}" \
605+ --notes-file /tmp/release_body.md
599606
600607 - name : Summary
601608 run : |
0 commit comments