Skip to content

Bump version

Bump version #43

Workflow file for this run

name: Bump version
on:
workflow_dispatch:
inputs:
version:
description: 'Version to bump (without prepending "v")'
required: true
maven-modules:
description: "Whether to bump versions in pom.xml files"
type: choice
required: true
default: 'true'
options:
- 'true'
- 'false'
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
if: ${{ inputs.maven-modules == 'true' }}
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).