Skip to content

Deploy via central publishing and update readme #14

Deploy via central publishing and update readme

Deploy via central publishing and update readme #14

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Java CI with Maven
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: 11
distribution: 'temurin'
server-id: ossrh
server-username: OSSRH_USERNAME
server-password: OSSRH_PASSWORD
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Verify with Maven
if: github.event_name == 'pull_request'
run: mvn -B -Prelease clean verify
- name: Verify javadoc
if: github.event_name == 'pull_request'
run: mvn -B -Prelease javadoc:test-javadoc
- name: Compile
run: mvn -B -Prelease compile
- name: Javadoc
run: mvn -B -Prelease javadoc:jar
- name: Source
run: mvn -B -Prelease source:jar
- name: Publish to Apache Maven Central
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
run: mvn -B -Prelease deploy
env:
OSSRH_USERNAME: ${{ secrets.MAVEN_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}