Skip to content

Commit 34a7863

Browse files
authored
Added actions-project-version-check step @maven-pr (#69)
1 parent e43ce9d commit 34a7863

File tree

3 files changed

+26
-4
lines changed

3 files changed

+26
-4
lines changed

.github/workflows/maven-pr.yml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,32 @@ on:
55
types: [ opened, synchronize, ready_for_review, review_requested ]
66

77
jobs:
8+
check-version:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- name: Check if version is updated
13+
uses: avides/actions-project-version-check@v1.3
14+
id: actions_project_version_check
15+
with:
16+
token: ${{ secrets.GITHUB_TOKEN }}
17+
file-to-check: pom.xml
18+
continue-on-error: true
19+
- name: Versioning specifications
20+
if: steps.actions_project_version_check.outcome != 'success'
21+
uses: thollander/actions-comment-pull-request@v1
22+
with:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
message: Project version has not been updated in pom.xml. Please, update your version using https://semver.org specifications
25+
- name: Exit if fails
26+
if: steps.actions_project_version_check.outcome != 'success'
27+
uses: cutenode/action-always-fail@v1
28+
- name: New software version
29+
if: steps.actions_project_version_check.outcome == 'success'
30+
run: echo "New software version is " ${{ steps.actions_project_version_check.outputs.version }}
31+
832
build:
9-
1033
runs-on: ubuntu-latest
11-
1234
steps:
1335
- uses: actions/checkout@v3
1436
- name: Set up JDK 11

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ After you have these installed, you need to add the Spring Cloud Contract Maven
3535
<dependency>
3636
<groupId>net.coru</groupId>
3737
<artifactId>scc-multiapi-converter</artifactId>
38-
<version>2.6.1</version>
38+
<version>2.7.1</version>
3939
<scope>compile</scope>
4040
</dependency>
4141
</dependencies>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>net.coru</groupId>
88
<artifactId>scc-multiapi-converter</artifactId>
9-
<version>2.7.0</version>
9+
<version>2.7.1</version>
1010
<name>SCC-MultiApi-Converter</name>
1111
<description>Generates Spring Cloud Contracts based on an OpenApi and AsyncApi document</description>
1212
<url>https://github.com/corunet/scc-multiapi-converter</url>

0 commit comments

Comments
 (0)