Skip to content

Commit 0972123

Browse files
Setting project version for maven build
1 parent 6195850 commit 0972123

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/release.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,18 @@ jobs:
2727
restore-keys: |
2828
${{ runner.os }}-maven-
2929
30+
- name: Set release version
31+
run: |
32+
VERSION=${{ github.event.inputs.version }}
33+
./mvnw versions:set -DnewVersion=$VERSION
34+
sed -i -e "s/^\:project-version\:\ .*/:project-version: $VERSION/g" README.adoc
35+
git add pom.xml
36+
git add README.adoc
37+
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
38+
git config --global user.name "GitHub Action"
39+
git commit -a -m "Releasing version $VERSION"
40+
git push origin master
41+
3042
- name: Build
3143
run: ./mvnw --no-transfer-progress -B --file pom.xml verify
3244

0 commit comments

Comments
 (0)