@@ -22,25 +22,30 @@ jobs:
2222 python-version : " 3.x"
2323 - id : bump-version
2424 run : |
25+ old_version="$(cz version -p)"
2526 cz bump --yes --annotated-tag
2627 git push --follow-tags
27- current_version="$(cz version -p)" # ATTENTION: You may have to add the v* at the beginning of the version
28- echo "current_version=$current_version" >> $GITHUB_OUTPUT
28+ new_version="$(cz version -p)"
29+ new_version_tag="$(cz version -p --tag)"
30+
31+ echo "old_version=$old_version" >> $GITHUB_OUTPUT
32+ echo "new_version=$new_version" >> $GITHUB_OUTPUT
33+ echo "new_version_tag=$new_version_tag" >> $GITHUB_OUTPUT
2934 - name : Build changelog for Release
3035 env :
31- CURRENT_VERSION : ${{ steps.bump-version.outputs.current_version }}
36+ NEW_VERSION : ${{ steps.bump-version.outputs.new_version }}
3237 run : |
33- cz changelog --dry-run "${CURRENT_VERSION }" > .changelog.md
38+ cz changelog --dry-run "${NEW_VERSION }" > .changelog.md
3439 - name : Release
3540 uses : softprops/action-gh-release@v2
3641 with :
3742 body_path : " .changelog.md"
38- tag_name : ${{ steps.bump-version.outputs.current_version }}
43+ tag_name : ${{ steps.bump-version.outputs.new_version }}
3944 env :
4045 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4146 - name : trigger other workflow
4247 env :
4348 GH_TOKEN : ${{ github.token }}
4449 run : |
45- gh workflow run .github/workflows/trigger-me .yaml \
46- -f "version=${{ steps.bump-version.outputs.current_version }}"
50+ gh workflow run release .yaml \
51+ -f "version=${{ steps.bump-version.outputs.new_version_tag }}"
0 commit comments