Bump version #37
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: Bump version | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Version to bump (without prepending "v")' | |
required: true | |
jobs: | |
bump: | |
name: Bump Java version | |
runs-on: ubuntu-latest | |
env: | |
NEW_VERSION: ${{ github.event.inputs.version }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup java | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 8 | |
- name: Bump version using Maven | |
run: './mvnw versions:set -DnewVersion=$NEW_VERSION -DgenerateBackupPoms=false -B' | |
- name: Bump version in docs | |
if: ${{ !endsWith(github.event.inputs.version, 'SNAPSHOT') }} | |
run: 'find . -type f -name "*.md" -exec sed -i -e "s+<version>[a-zA-Z0-9.-]*<\/version>+<version>$NEW_VERSION</version>+g" {} +' | |
- name: Create version bump PR | |
uses: peter-evans/create-pull-request@v3 | |
with: | |
title: "[Release] Bump to ${{ github.event.inputs.version }}" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: "Bump to ${{ github.event.inputs.version }}" | |
signoff: true | |
branch: "bump/${{ github.event.inputs.version }}" | |
body: > | |
This PR performs the bump of the SDK to ${{ github.event.inputs.version }}. | |
This PR is auto-generated by | |
[create-pull-request](https://github.com/peter-evans/create-pull-request). | |