Skip to content

Commit

Permalink
build: consolidate GH actions
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Reichel <[email protected]>
  • Loading branch information
manticore-projects committed Feb 1, 2025
1 parent 96aa8c5 commit 7456ec0
Showing 1 changed file with 22 additions and 28 deletions.
50 changes: 22 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ on:
branches: [ "master" ]
workflow_dispatch:

permissions:
contents: read
permissions: write-all

jobs:
gradle_check:
Expand All @@ -25,9 +24,29 @@ jobs:
- name: Run Gradle Check
run: gradle check

gradle_publish:
maven_verify:
needs: gradle_check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Set up JDK 11
uses: actions/setup-java@main
with:
java-version: '11'
distribution: 'temurin'
cache: maven
server-id: sonatype-nexus-snapshots
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Build with Maven
run: mvn -B verify --file pom.xml -DdisableXmlReport=true -Djacoco.skip=true -Dpmd.skip=true
env:
MAVEN_USERNAME: ${{ secrets.OSSRHUSERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRHPASSWORD }}

gradle_publish:
needs: maven_verify
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
with:
Expand All @@ -44,11 +63,6 @@ jobs:
env:
ossrhUsername: ${{ secrets.OSSRHUSERNAME }}
ossrhPassword: ${{ secrets.OSSRHPASSWORD }}

gradle_sphinx:
needs: gradle_publish
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@main
- name: Install XSLT Processor
run: sudo apt-get install xsltproc sphinx-common
Expand All @@ -72,23 +86,3 @@ jobs:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@main

maven_publish:
needs: gradle_sphinx
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Set up JDK 11
uses: actions/setup-java@main
with:
java-version: '11'
distribution: 'temurin'
cache: maven
server-id: sonatype-nexus-snapshots
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Build with Maven
run: mvn -B deploy --file pom.xml -DdisableXmlReport=true -Djacoco.skip=true -Dpmd.skip=true
env:
MAVEN_USERNAME: ${{ secrets.OSSRHUSERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRHPASSWORD }}

0 comments on commit 7456ec0

Please sign in to comment.