39 lines
1.4 KiB
YAML
39 lines
1.4 KiB
YAML
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: 'mvn 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).
|
|
|