File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5656 with :
5757 # Fetch all history for changelog generation
5858 fetch-depth : 0
59- # Checkout the specific commit created by the version bump job
60- ref : ${{ needs.calculate-version.outputs.version_commit_sha }}
59+ # Checkout the branch, not the specific commit, to avoid detached HEAD
60+ ref : ${{ github.ref_name }}
6161
6262 - name : Set up Node.js
6363 uses : actions/setup-node@v4
8080 # Check if there are changes to commit to avoid error if changelog is empty or unchanged
8181 if ! git diff --staged --quiet; then
8282 git commit -m "docs(changelog): update CHANGELOG.md for v${{ needs.calculate-version.outputs.new_version }}"
83- git push
83+ git push origin HEAD:${{ github.ref_name }} # Push to the correct branch
8484 else
8585 echo "No changes to CHANGELOG.md to commit."
8686 fi
You can’t perform that action at this time.
0 commit comments