Bump version #5
This file contains hidden or 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: Bump version | |
on: | |
workflow_dispatch: | |
workflow_run: | |
workflows: [release] | |
types: [completed] | |
env: | |
JAVA_VERSION: 17 | |
jobs: | |
bump-version: | |
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }} | |
permissions: | |
contents: write | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Generate GitHub App(webauthn4j-github-app-bot) Token | |
id: app-token | |
uses: actions/create-github-app-token@v1 | |
with: | |
app-id: ${{ secrets.BOT_APP_ID }} | |
private-key: ${{ secrets.BOT_PRIVATE_KEY }} | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ steps.app-token.outputs.token }} | |
- name: Set up JDK ${{ env.JAVA_VERSION }} | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: ${{ env.JAVA_VERSION }} | |
cache: 'gradle' | |
- name: Bump patch version | |
run: | | |
./gradlew bumpPatchVersion | |
- name: Switch to snapshot | |
run: | | |
./gradlew switchToSnapshot | |
- name: Commit changes | |
run: | | |
git config user.name "webauthn4j-bot" | |
git config user.email "[email protected]" | |
git add . | |
git commit -m "Bump patch version" | |
- name: Push commit | |
run: | | |
git push |