-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (37 loc) · 1.04 KB
/
version-bump.yml
File metadata and controls
40 lines (37 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: 'Bump version'
on:
pull_request:
workflow_dispatch:
jobs:
checks:
name: Bump main pom version
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
token: ${{ secrets.USER_TOKEN }}
ref: ${{ github.event.pull_request.head.ref }}
- name: Update pom
id: bump
run: |
python3 ./ci/pom_bump.py
git diff --cached
- name: Changes?
id: is_changed
run: |
if ! git diff --exit-code pom.xml
then
echo "CHANGED!"
echo "::set-output name=IS_CHANGED::1"
else
echo "not changed"
fi
- name: Commit bump
if: ${{ steps.is_changed.outputs.IS_CHANGED == '1' }}
run: |
git config --global user.name 'VersionBumper'
git config --global user.email 'mverleg.noreply@gmail.com'
git commit -am "Automatic version bump ${{ steps.bump.outputs.BUMP_DESC }}"
git push