@@ -23,32 +23,35 @@ jobs:
2323 - id : bump-version
2424 run : |
2525 cz bump --yes
26- current_version="v$(cz version -p)"
26+
27+ new_version="v$(cz version -p)"
2728 major_version="v$(cz version -p --major)"
28- echo "current_version=$current_version" >> $GITHUB_OUTPUT
29+ new_version_tag="$(cz version -p --tag)"
30+
31+ echo "new_version=$new_version" >> $GITHUB_OUTPUT
2932 echo "major_version=$major_version" >> $GITHUB_OUTPUT
33+ echo "new_version_tag=$new_version_tag" >> $GITHUB_OUTPUT
3034 - name : Update major tag
3135 env :
32- CURRENT_VERSION : ${{ steps.bump-version.outputs.current_version }}
36+ NEW_VERSION : ${{ steps.bump-version.outputs.new_version }}
3337 MAJOR_VERSION : ${{ steps.bump-version.outputs.major_version }}
3438 run : |
3539 # Push new commit + new tag
3640 git push --follow-tags
3741
3842 # Move major tag to the latest commit
39- git tag -fa "${MAJOR_VERSION}" -m "release ${CURRENT_VERSION }"
43+ git tag -fa "${MAJOR_VERSION}" -m "release ${NEW_VERSION }"
4044
4145 # Force push new major tag
4246 git push origin "${MAJOR_VERSION}" -f
4347 - name : Build changelog
4448 env :
45- CURRENT_VERSION : ${{ steps.bump-version.outputs.current_version }}
49+ NEW_VERSION : ${{ steps.bump-version.outputs.new_version }}
4650 run : |
47- cz changelog --dry-run "${CURRENT_VERSION }" > .changelog.md
51+ cz changelog --dry-run "${NEW_VERSION }" > .changelog.md
4852 - name : Release
49- uses : softprops/action-gh-release@v2
50- with :
51- body_path : " .changelog.md"
52- tag_name : ${{ steps.bump-version.outputs.current_version }}
5353 env :
54- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
54+ GH_TOKEN : ${{ github.token }}
55+ NEW_VERSION_TAG : ${{ steps.bump-version.outputs.new_version_tag }}
56+ run : |
57+ gh release create "${NEW_VERSION_TAG}" --notes-file .changelog.md
0 commit comments