increment-patch #56
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: increment-patch | |
on: | |
workflow_dispatch: | |
jobs: | |
incrementPatch: | |
name: incrementPatch | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Grant Permission to Execute Gradle | |
run: chmod +x gradlew | |
- name: Increment Patch Number | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: incrementPatchVersion | |
- id: get_version | |
name: Retrieve version | |
run: echo "::set-output name=VERSION::$(./gradlew printVersionName | grep version | cut -f 2 -d =)" | |
- name: Commit and push the new version | |
run: | | |
git config --global user.name "github-actions" | |
git config --global user.email "[email protected]" | |
git commit -a -m "[githubAction] increment Patch Version to ${{ steps.get_version.outputs.VERSION }}" | |
git push |