Skip to content

Commit e481d6f

Browse files
GH Actions, round 3 (#242)
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
1 parent 36c6a78 commit e481d6f

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/bump.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Bump version
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
version:
6+
description: 'Version to bump (without prepending "v")'
7+
required: true
8+
9+
jobs:
10+
bump:
11+
name: Bump Java version
12+
env:
13+
NEW_VERSION: ${{ github.event.inputs.version }}
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Setup java
17+
uses: actions/setup-java@v1
18+
with:
19+
java-version: 8
20+
- name: Bump version using Maven
21+
run: 'mvn versions:set -DnewVersion=$NEW_VERSION'
22+
- name: Bump version in docs
23+
if: ${{ !endsWith(github.event.inputs.version, 'SNAPSHOT') }}
24+
run: 'sed -i -e "s+<version>[a-zA-Z0-9.-]*<\/version>+<version>$NEW_VERSION</version>+g" ***/*.md'
25+
- name: Create version bump PR
26+
uses: peter-evans/create-pull-request@v3
27+
with:
28+
title: "[Release] Bump to ${{ github.event.inputs.version }}"
29+
token: ${{ secrets.GITHUB_TOKEN }}
30+
commit-message: "Bump to ${{ github.event.inputs.version }}"
31+
signoff: true
32+
branch: "bump/${{ github.event.inputs.version }}"
33+
body: >
34+
This PR performs the bump of the SDK to ${{ github.event.inputs.version }}.
35+
This PR is auto-generated by
36+
[create-pull-request](https://github.com/peter-evans/create-pull-request).
37+

0 commit comments

Comments
 (0)