88 type : boolean
99 description : Create snapshot release
1010 default : true
11+ skip_checks :
12+ type : boolean
13+ description : Skip quality checks
14+ default : false
1115 skip_publish :
1216 type : boolean
1317 description : Ship publish to Maven Central
1418 default : false
19+ conintue_on_error :
20+ type : boolean
21+ description :
22+ default : false
1523
1624name : Release
1725run-name : Release
@@ -22,6 +30,8 @@ permissions:
2230jobs :
2331 version_seal :
2432 runs-on : ubuntu-latest
33+ outputs :
34+ source_hash : ${{ steps.upload_source.outputs.artifact-digest }}
2535 steps :
2636 - id : checkout
2737 name : Checkout repository
@@ -31,15 +41,76 @@ jobs:
3141 uses : ./.github/actions/version
3242 with :
3343 new_version : ${{ inputs.version }}
34- - id : seal
35- name : seal
36- uses : ./.github/ actions/seal
44+ - id : upload_source
45+ name : Upload artifacts
46+ uses : actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
3747 with :
38- prefix : source
39-
48+ if-no-files-found : error
49+ name : source
50+ path : |
51+ *
52+ !.git/*
53+ include-hidden-files : true
54+ retention-days : 1
55+
4056 quality :
4157 runs-on : ubuntu-latest
58+ needs :
59+ - version_seal
60+ if : ${{ inputs.skip_checks }}
61+ permissions :
62+ contents : write
63+ id-token : write
4264 steps :
43- - id : restore
44- name : restore
45- uses : ./.github/restore
65+ - id : download_source
66+ name : Download artifacts
67+ uses : actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.6.1
68+ with :
69+ name : source
70+ - name : Setup Java
71+ uses : actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12
72+ with :
73+ distribution : corretto
74+ java-version : 21
75+ cache : maven
76+ # non-exhuastive, but gives a fair indication if the final build will succeed, tests will run when we build later
77+ - name : Run unit tests
78+ run : mvn -B test --file pom.xml
79+ continue-on-error : ${{ inputs.conintue_on_error }}
80+ - name : Run Spotbugs
81+ run : mvn -Pbuild-with-spotbugs -B install --file pom.xml -DskipTests -Dmaven.javadoc.skip=true -Dspotbugs.failOnError=${{ inputs.conintue_on_error }}
82+ continue-on-error : ${{ inputs.conintue_on_error }}
83+ - uses : pmd/pmd-github-action@d9c1f3c5940cbf5923f1354e83fa858b4496ebaa # v2.0.0
84+ with :
85+ rulesets : ' .github/pmd-ruleset.xml'
86+ token : ${{ secrets.GITHUB_TOKEN }}
87+ uploadSarifReport : false
88+
89+ build :
90+ runs-on : ubuntu-latest
91+ needs :
92+ - quality
93+ strategy :
94+ matrix :
95+ java_version :
96+ - 8
97+ - 11
98+ - 17
99+ - 21
100+ steps :
101+ - id : download_source
102+ name : Download artifacts
103+ uses : actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.6.1
104+ with :
105+ name : source
106+ - name : Setup Java
107+ uses : actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12
108+ with :
109+ distribution : corretto
110+ java-version : ${{ matrix.java_version }}
111+ cache : maven
112+ - id : build-maven
113+ name : Build (Maven)
114+ run : |
115+ mvn -B install --file pom.xml
116+
0 commit comments