Skip to content

Commit 785f54a

Browse files
committed
ci: Add version increment in PRs
1 parent 08521cc commit 785f54a

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.github/workflows/maven.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ jobs:
3838
# cache: npm
3939
- name: Build with Maven
4040
if: steps.increment-version.outputs.previous-version != steps.increment-version.outputs.new-version # skip anything build-related on unnecessary commits
41-
run: mvnw -B package -Drevision='${{ steps.increment-version.outputs.new-version }}' -Dchangelog='' --file pom.xml
41+
run: ./mvnw -B package -Drevision='${{ steps.increment-version.outputs.new-version }}' -Dchangelog='' --file pom.xml
4242
- name: Update pom.xml
4343
if: steps.increment-version.outputs.previous-version != steps.increment-version.outputs.new-version # skip anything build-related on unnecessary commits
44-
run: mvnw org.codehaus.mojo:versions-maven-plugin:2.7:set-property -Dproperty=revision -DnewVersion='${{ steps.increment-version.outputs.new-version }}'
44+
run: ./mvnw org.codehaus.mojo:versions-maven-plugin:2.7:set-property -Dproperty=revision -DnewVersion='${{ steps.increment-version.outputs.new-version }}'
4545
- name: push
4646
if: steps.increment-version.outputs.previous-version != steps.increment-version.outputs.new-version # skip anything build-related on unnecessary commits
4747
uses: github-actions-x/commit@v2.9

.github/workflows/pull_request.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ jobs:
88
steps:
99
- uses: actions/checkout@v3
1010
- uses: webiny/action-conventional-commits@v1.2.0
11+
- name: Increment version
12+
id: increment-version
13+
uses: RichardInnocent/semantic-versioning-maven@v0.1.0
1114
- name: Set up JDK 21
1215
uses: actions/setup-java@v3
1316
with:
@@ -19,4 +22,4 @@ jobs:
1922
# with:
2023
# cache: npm
2124
- name: Build with Maven
22-
run: mvnw -B package -Drevision='${{ steps.increment-version.outputs.new-version }}' --file pom.xml
25+
run: ./mvnw -B package -Drevision='${{ steps.increment-version.outputs.new-version }}' --file pom.xml

0 commit comments

Comments
 (0)