@@ -25,40 +25,42 @@ jobs:
2525 id : bump_version
2626 env :
2727 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
28+ NEW_VERSION : ${{ github.event.inputs.new_version }}
29+ CHANGELOG : ${{ github.event.inputs.changelog }}
2830 run : |
2931 old_version=$(sed -e 's/.*=//' version.properties)
30- echo "Bumping old version: $old_version to new version ${{ github.event.inputs.new_version }} ."
32+ echo "Bumping old version: $old_version to new version $NEW_VERSION ."
3133 echo "Changelog:"
32- echo "- ${{ github.event.inputs.changelog }} "
34+ echo "- $CHANGELOG "
3335
34- echo "# ${{ github.event.inputs.new_version }} " >> new_CHANGELOG.md
36+ echo "# $NEW_VERSION " >> new_CHANGELOG.md
3537 echo >> new_CHANGELOG.md
36- echo "- ${{ github.event.inputs.changelog }} " >> new_CHANGELOG.md
38+ echo "- $CHANGELOG " >> new_CHANGELOG.md
3739 echo >> new_CHANGELOG.md
3840 cat CHANGELOG.md >> new_CHANGELOG.md
3941 mv new_CHANGELOG.md CHANGELOG.md
4042
41- sed -i -e "s/$old_version/${{ github.event.inputs.new_version }} /" version.properties README.md
43+ sed -i -e "s/$old_version/$NEW_VERSION /" version.properties README.md
4244
43- echo "version=${{ github.event.inputs.new_version }} " > version.properties
45+ echo "version=$NEW_VERSION " > version.properties
4446
4547 git diff
4648
4749 git config --global user.name "${GITHUB_USER:-Automated Version Bump}"
4850 git config --global user.email "${GITHUB_EMAIL:[email protected] }" 4951
5052 git add --all
51- git commit -m "Prep for releasing version ${{ github.event.inputs.new_version }} ."
53+ git commit -m "Prep for releasing version $NEW_VERSION ."
5254
5355 git log -n 1
5456
55- git tag "v${{ github.event.inputs.new_version }} "
57+ git tag "v$NEW_VERSION "
5658 remote="https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
5759
5860 git push "${remote}" --follow-tags
5961 git push "${remote}" --tags
6062
61- echo "::set-output name=new_tag::v${{ github.event.inputs.new_version }} "
63+ echo "::set-output name=new_tag::v$NEW_VERSION "
6264
6365 - name : Create release
6466 id : create_release
0 commit comments