20
20
name : Build # To isolate BUMP_PAT
21
21
url : ${{ steps.upload.outputs.artifact-url }}
22
22
outputs :
23
- artifact_name : app-${{ steps.bump .outputs.tag }}
24
- new_tag : ${{ steps.bump .outputs.tag }}
23
+ artifact_name : app-${{ steps.semver .outputs.nextStrict }}
24
+ new_tag : ${{ steps.semver .outputs.nextStrict }}
25
25
26
26
steps :
27
27
- name : Checkout
@@ -44,16 +44,17 @@ jobs:
44
44
key : ${{ runner.os }}-sonar
45
45
restore-keys : ${{ runner.os }}-sonar
46
46
47
- - name : Run Tests
48
- run : mvn test -B -P prod "-Dstyle.color=always"
49
-
50
- - name : Bump Maven version
51
- id : bump
52
- uses : soat-tech-challenge/gh-action-bump-maven-version@main
47
+ - name : Get Version Information
48
+ id : semver
49
+ uses : ietf-tools/semver-action@v1
53
50
with :
54
- commit-message : " [skip ci] Bump version to"
51
+ token : ${{ github.token }}
52
+ patchAll : true
53
+
54
+ - name : Set Next Version # So app can be packaged with correct version
55
+ run : mvn org.codehaus.mojo:versions-maven-plugin:set -DnewVersion=${{ steps.semver.outputs.nextStrict }}
55
56
56
- - name : Verify with Maven
57
+ - name : Verify and Scan with Maven
57
58
env :
58
59
SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
59
60
run : |
@@ -65,11 +66,18 @@ jobs:
65
66
-Dsonar.organization=soat-tech-challenge \
66
67
-Dsonar.projectKey=soat-tech-challenge_$REPO_NAME
67
68
69
+ - name : Commit, Tag and Push New Version
70
+ id : bump
71
+ uses : soat-tech-challenge/gh-action-bump-maven-version@main
72
+ with :
73
+ commit-message : " [skip ci] Bump version to"
74
+ version : ${{ steps.semver.outputs.nextStrict }}
75
+
68
76
- name : Upload Artifact
69
77
id : upload
70
78
uses : actions/upload-artifact@v4
71
79
with :
72
- name : app-${{ steps.bump .outputs.tag }}
80
+ name : app-${{ steps.semver .outputs.nextStrict }}
73
81
path : target/app.jar
74
82
if-no-files-found : error
75
83
0 commit comments