Skip to content

Commit 870e349

Browse files
committed
added module version bumper
1 parent c6ac5ab commit 870e349

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/bump-module-version.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: versionbump
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- main
8+
pull_request:
9+
branches:
10+
- master
11+
- main
12+
release:
13+
types:
14+
- released
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: Bump version
22+
run: |
23+
git config --global user.name 'ProjectBot'
24+
git config --global user.email '[email protected]'
25+
VERSION=$(sed -n '0,/.*<Version>\(.*\)<\/Version>.*/s//\1/p' module.xml)
26+
VERSION=`echo $VERSION | awk -F. '/[0-9]+\./{$NF++;print}' OFS=.`
27+
sed -i "0,/<Version>\(.*\)<\/Version>/s//<Version>$VERSION<\/Version>/" module.xml
28+
git add module.xml
29+
git commit -m 'auto bump version'
30+
git push

0 commit comments

Comments
 (0)