Skip to content

Maven Publish

Maven Publish #1

Workflow file for this run

name: Maven Publish
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: maven
- uses: s4u/[email protected]
with:
servers: '[{"id": "central", "username": "${{ secrets.CENTRAL_USERNAME }}", "password": "${{ secrets.CENTRAL_TOKEN }}"}]'
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Publish to Maven Central
run: mvn deploy