Skip to content

Switch to Java 22 (no preview needed), deploy snapshots to OSSRH #8

Switch to Java 22 (no preview needed), deploy snapshots to OSSRH

Switch to Java 22 (no preview needed), deploy snapshots to OSSRH #8

Workflow file for this run

# For more information see:
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
# https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md
name: Java CI with Maven
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Set up JDK
uses: actions/[email protected]
with:
java-version: '22'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Update dependency graph # Improve the quality of Dependabot alerts
uses: advanced-security/[email protected]
deploy:
runs-on: ubuntu-latest
needs: build
if: github.repository_owner == 'alveolo' && github.ref == 'refs/heads/main'
steps:
- uses: actions/[email protected]
- name: Set up JDK
uses: actions/[email protected]
with:
java-version: '22'
distribution: 'temurin'
cache: maven
server-id: ossrh
server-username: ${{ secrets.OSSRH_USERNAME }}
server-password: ${{ secrets.OSSRH_PASSWORD }}
- name: Deploy to Sonatype OSSRH
run: mvn -B deploy --file pom.xml