Skip to content

Commit 7456ec0

Browse files
build: consolidate GH actions
Signed-off-by: Andreas Reichel <andreas@manticore-projects.com>
1 parent 96aa8c5 commit 7456ec0

File tree

1 file changed

+22
-28
lines changed

1 file changed

+22
-28
lines changed

.github/workflows/ci.yml

Lines changed: 22 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ on:
77
branches: [ "master" ]
88
workflow_dispatch:
99

10-
permissions:
11-
contents: read
10+
permissions: write-all
1211

1312
jobs:
1413
gradle_check:
@@ -25,9 +24,29 @@ jobs:
2524
- name: Run Gradle Check
2625
run: gradle check
2726

28-
gradle_publish:
27+
maven_verify:
2928
needs: gradle_check
3029
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@main
32+
- name: Set up JDK 11
33+
uses: actions/setup-java@main
34+
with:
35+
java-version: '11'
36+
distribution: 'temurin'
37+
cache: maven
38+
server-id: sonatype-nexus-snapshots
39+
server-username: MAVEN_USERNAME
40+
server-password: MAVEN_PASSWORD
41+
- name: Build with Maven
42+
run: mvn -B verify --file pom.xml -DdisableXmlReport=true -Djacoco.skip=true -Dpmd.skip=true
43+
env:
44+
MAVEN_USERNAME: ${{ secrets.OSSRHUSERNAME }}
45+
MAVEN_PASSWORD: ${{ secrets.OSSRHPASSWORD }}
46+
47+
gradle_publish:
48+
needs: maven_verify
49+
runs-on: ubuntu-latest
3150
steps:
3251
- uses: actions/checkout@main
3352
with:
@@ -44,11 +63,6 @@ jobs:
4463
env:
4564
ossrhUsername: ${{ secrets.OSSRHUSERNAME }}
4665
ossrhPassword: ${{ secrets.OSSRHPASSWORD }}
47-
48-
gradle_sphinx:
49-
needs: gradle_publish
50-
runs-on: ubuntu-latest
51-
steps:
5266
- uses: actions/setup-python@main
5367
- name: Install XSLT Processor
5468
run: sudo apt-get install xsltproc sphinx-common
@@ -72,23 +86,3 @@ jobs:
7286
- name: Deploy to GitHub Pages
7387
id: deployment
7488
uses: actions/deploy-pages@main
75-
76-
maven_publish:
77-
needs: gradle_sphinx
78-
runs-on: ubuntu-latest
79-
steps:
80-
- uses: actions/checkout@main
81-
- name: Set up JDK 11
82-
uses: actions/setup-java@main
83-
with:
84-
java-version: '11'
85-
distribution: 'temurin'
86-
cache: maven
87-
server-id: sonatype-nexus-snapshots
88-
server-username: MAVEN_USERNAME
89-
server-password: MAVEN_PASSWORD
90-
- name: Build with Maven
91-
run: mvn -B deploy --file pom.xml -DdisableXmlReport=true -Djacoco.skip=true -Dpmd.skip=true
92-
env:
93-
MAVEN_USERNAME: ${{ secrets.OSSRHUSERNAME }}
94-
MAVEN_PASSWORD: ${{ secrets.OSSRHPASSWORD }}

0 commit comments

Comments
 (0)