Skip to content

Commit 9cc68c2

Browse files
committed
add module bumper
1 parent 92418f8 commit 9cc68c2

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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+
permissions:
16+
contents: write
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v2
22+
- name: Bump version
23+
run: |
24+
git config --global user.name 'ProjectBot'
25+
git config --global user.email 'bot@users.noreply.github.com'
26+
VERSION=$(sed -n '0,/.*<Version>\(.*\)<\/Version>.*/s//\1/p' module.xml)
27+
VERSION=`echo $VERSION | awk -F. '/[0-9]+\./{$NF++;print}' OFS=.`
28+
sed -i "0,/<Version>\(.*\)<\/Version>/s//<Version>$VERSION<\/Version>/" module.xml
29+
git add module.xml
30+
git commit -m 'auto bump version'
31+
git push

0 commit comments

Comments
 (0)