File tree 5 files changed +116
-75
lines changed
5 files changed +116
-75
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish Development Build
2
+
3
+ permissions :
4
+ contents : write
5
+
6
+ on :
7
+ push :
8
+ branches :
9
+ - ' develop'
10
+
11
+ jobs :
12
+ build :
13
+ runs-on : ubuntu-latest
14
+ steps :
15
+ - name : Check out source code
16
+ uses : actions/checkout@v4
17
+ - name : Set up JDK 11
18
+ uses : actions/setup-java@v1
19
+ with :
20
+ java-version : 11
21
+ - name : Set up Maven cache
22
+ uses : actions/cache@v1
23
+ with :
24
+ path : ~/.m2/repository
25
+ key : ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
26
+ restore-keys : |
27
+ ${{ runner.os }}-maven-
28
+ - name : Build with Maven
29
+ run : mvn clean verify -U
30
+ - name : Get current date
31
+ id : date
32
+ run : echo "::set-output name=date::$(date +'%Y-%m-%d %H:%M:%S %Z')"
33
+ - name : Create tag name from date
34
+ id : tagdate
35
+ run : echo "::set-output name=tagdate::$(date +'%Y-%m-%d_%H-%M-%S_%Z')"
36
+ - name : Release
37
+ id : create_release
38
+ uses : softprops/action-gh-release@v2
39
+ with :
40
+ name : ${{ steps.date.outputs.date }}
41
+ tag_name : ${{ steps.tagdate.outputs.tagdate }}
42
+ generate_release_notes : true
43
+ draft : false
44
+ prerelease : true
45
+ files : |
46
+ **/target/*.jar
47
+ install/*
48
+
Original file line number Diff line number Diff line change
1
+ name : Publish Release Build
2
+
3
+ permissions :
4
+ contents : write
5
+
6
+ on :
7
+ push :
8
+ branches :
9
+ - ' master'
10
+
11
+ jobs :
12
+ build :
13
+ runs-on : ubuntu-latest
14
+ steps :
15
+ - name : Check out source code
16
+ uses : actions/checkout@v4
17
+ - name : Set up JDK 11
18
+ uses : actions/setup-java@v1
19
+ with :
20
+ java-version : 11
21
+ - name : Set up Maven cache
22
+ uses : actions/cache@v1
23
+ with :
24
+ path : ~/.m2/repository
25
+ key : ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
26
+ restore-keys : |
27
+ ${{ runner.os }}-maven-
28
+ - name : Build with Maven
29
+ run : mvn clean verify -U
30
+ - name : Get current date
31
+ id : date
32
+ run : echo "::set-output name=date::$(date +'%Y-%m-%d %H:%M:%S %Z')"
33
+ - name : Create tag name from date
34
+ id : tagdate
35
+ run : echo "::set-output name=tagdate::$(date +'%Y-%m-%d_%H-%M-%S_%Z')"
36
+ - name : Release
37
+ id : create_release
38
+ uses : softprops/action-gh-release@v2
39
+ with :
40
+ name : ${{ steps.date.outputs.date }}
41
+ tag_name : ${{ steps.tagdate.outputs.tagdate }}
42
+ generate_release_notes : true
43
+ draft : false
44
+ prerelease : false
45
+ files : |
46
+ **/target/*.jar
47
+ install/*
48
+
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -43,16 +43,33 @@ pipeline {
43
43
}
44
44
}
45
45
46
- stage(' deploy-libs' ) {
46
+ stage(' deploy-snapshot- libs' ) {
47
47
when {
48
48
anyOf {
49
- branch ' master'
50
49
branch ' develop'
51
50
}
52
51
}
53
52
steps {
54
53
script {
55
54
if (fileExists(' module-lib/pom.xml' )) {
55
+ sh ' cat pom.xml | grep "SNAPSHOT"'
56
+ sh ' mvn -N deploy'
57
+ sh ' mvn -f module-lib/pom.xml deploy'
58
+ }
59
+ }
60
+ }
61
+ }
62
+
63
+ stage(' deploy-release-libs' ) {
64
+ when {
65
+ anyOf {
66
+ branch ' master'
67
+ }
68
+ }
69
+ steps {
70
+ script {
71
+ if (fileExists(' module-lib/pom.xml' )) {
72
+ sh ' cat pom.xml | grep "SNAPSHOT" || true'
56
73
sh ' mvn -N deploy'
57
74
sh ' mvn -f module-lib/pom.xml deploy'
58
75
}
@@ -63,7 +80,7 @@ pipeline {
63
80
64
81
post {
65
82
always {
66
- junit " **/target/surefire-reports/*.xml"
83
+ junit allowEmptyResults : true , testResults : " **/target/surefire-reports/*.xml"
67
84
step([
68
85
$class : ' JacocoPublisher' ,
69
86
execPattern : ' **/target/jacoco.exec' ,
File renamed without changes.
You can’t perform that action at this time.
0 commit comments