Skip to content

Commit

Permalink
Update release-v2.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
yvasyliev authored Nov 15, 2023
1 parent e894aba commit 18a2076
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/release-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,23 @@ jobs:
echo "new_version=$NEW_VERSION"
echo "New version is \`$NEW_VERSION\`" >> "$GITHUB_STEP_SUMMARY"
echo "new-version=$NEW_VERSION" >> "$GITHUB_OUTPUT"
commit-new-version:
runs-on: ubuntu-latest
needs: [ get-current-version,get-new-version ]
env:
CURRENT_VERSION: ${{ needs.get-current-version.outputs.current-version }}
NEW_VERSION: ${{ needs.get-new-version.outputs.new-version }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Commit new version
if: github.event.inputs.release_type != 'provided'
run: |
xmlstarlet ed -P -L -N pom=http://maven.apache.org/POM/4.0.0 -u "/pom:project/pom:version" -v "$NEW_VERSION" pom.xml
sed -i 's/$CURRENT_VERSION/$NEW_VERSION/g' README.md
git config user.email "[email protected]"
git config user.name "github-actions"
git add pom.xml README.md
git commit -m "v$NEW_VERSION"
git push

0 comments on commit 18a2076

Please sign in to comment.