1
- name : Nightly Build
1
+ name : Continuous Integration
2
2
on :
3
3
push :
4
4
branches :
5
- - ' **'
5
+ - ' 2.2'
6
+
7
+ release :
8
+ types : [ created ]
6
9
7
10
jobs :
8
- generate-headers :
11
+ compile-java :
9
12
runs-on : ubuntu-latest
10
13
steps :
11
14
- name : Checkout
20
23
java-package : jdk
21
24
architecture : x64
22
25
23
- - name : Generate
26
+ - name : Compile
24
27
shell : bash
25
28
run : |
26
29
mvn -B --no-transfer-progress compile
34
37
if-no-files-found : error
35
38
36
39
37
- apple-arm64 :
38
- needs : generate-headers
40
+ compile- apple-arm64 :
41
+ needs : compile-java
39
42
runs-on : macos-latest
40
43
41
44
steps :
92
95
${{github.workspace}}/src/main/resources
93
96
if-no-files-found : error
94
97
95
- apple-x86_64 :
96
- needs : generate-headers
98
+ compile- apple-x86_64 :
99
+ needs : compile-java
97
100
runs-on : macos-latest
98
101
99
102
steps :
@@ -151,8 +154,8 @@ jobs:
151
154
if-no-files-found : error
152
155
153
156
154
- linux-arm :
155
- needs : generate-headers
157
+ compile- linux-arm :
158
+ needs : compile-java
156
159
runs-on : ubuntu-latest
157
160
158
161
steps :
@@ -241,8 +244,8 @@ jobs:
241
244
${{github.workspace}}/src/main/resources
242
245
if-no-files-found : error
243
246
244
- linux-arm64 :
245
- needs : generate-headers
247
+ compile- linux-arm64 :
248
+ needs : compile-java
246
249
runs-on : ubuntu-latest
247
250
248
251
steps :
@@ -331,8 +334,8 @@ jobs:
331
334
${{github.workspace}}/src/main/resources
332
335
if-no-files-found : error
333
336
334
- linux-x86 :
335
- needs : generate-headers
337
+ compile- linux-x86 :
338
+ needs : compile-java
336
339
runs-on : ubuntu-latest
337
340
338
341
steps :
@@ -417,8 +420,8 @@ jobs:
417
420
${{github.workspace}}/src/main/resources
418
421
if-no-files-found : error
419
422
420
- linux-x86_64 :
421
- needs : generate-headers
423
+ compile- linux-x86_64 :
424
+ needs : compile-java
422
425
runs-on : ubuntu-latest
423
426
424
427
steps :
@@ -492,8 +495,8 @@ jobs:
492
495
if-no-files-found : error
493
496
494
497
495
- windows-arm :
496
- needs : generate-headers
498
+ compile- windows-arm :
499
+ needs : compile-java
497
500
runs-on : windows-latest
498
501
499
502
steps :
@@ -557,8 +560,8 @@ jobs:
557
560
${{github.workspace}}/src/main/resources
558
561
if-no-files-found : error
559
562
560
- windows-x86 :
561
- needs : generate-headers
563
+ compile- windows-x86 :
564
+ needs : compile-java
562
565
runs-on : windows-latest
563
566
564
567
steps :
@@ -620,8 +623,8 @@ jobs:
620
623
${{github.workspace}}/src/main/resources
621
624
if-no-files-found : error
622
625
623
- windows-x86_64 :
624
- needs : generate-headers
626
+ compile- windows-x86_64 :
627
+ needs : compile-java
625
628
runs-on : windows-latest
626
629
627
630
steps :
@@ -685,15 +688,15 @@ jobs:
685
688
686
689
package :
687
690
needs : [
688
- apple-arm64,
689
- apple-x86_64,
690
- linux-arm,
691
- linux-arm64,
692
- linux-x86,
693
- linux-x86_64,
694
- windows-arm,
695
- windows-x86,
696
- windows-x86_64
691
+ compile- apple-arm64,
692
+ compile- apple-x86_64,
693
+ compile- linux-arm,
694
+ compile- linux-arm64,
695
+ compile- linux-x86,
696
+ compile- linux-x86_64,
697
+ compile- windows-arm,
698
+ compile- windows-x86,
699
+ compile- windows-x86_64
697
700
]
698
701
runs-on : ubuntu-latest
699
702
steps :
@@ -718,14 +721,24 @@ jobs:
718
721
server-username : MAVEN_USERNAME
719
722
server-password : MAVEN_PASSWORD
720
723
721
- - name : Package
724
+ - name : Package Snapshot
725
+ if : ${{ github.event_name == 'push' }}
722
726
env :
723
727
MAVEN_USERNAME : ${{ secrets.OSSRH_USERNAME }}
724
728
MAVEN_PASSWORD : ${{ secrets.OSSRH_TOKEN }}
725
729
shell : bash
726
730
run : |
727
731
mvn -B --no-transfer-progress deploy
728
732
733
+ - name : Package Release
734
+ if : ${{ github.event_name == 'release' && github.event.action == 'created' }}
735
+ env :
736
+ MAVEN_USERNAME : ${{ secrets.OSSRH_USERNAME }}
737
+ MAVEN_PASSWORD : ${{ secrets.OSSRH_TOKEN }}
738
+ shell : bash
739
+ run : |
740
+ mvn -Drevision="${GITHUB_REF#refs/tags/}" -B --no-transfer-progress deploy
741
+
729
742
- name : Upload
730
743
uses : actions/upload-artifact@v2
731
744
with :
0 commit comments