Skip to content

Snapshot package publisher #945

Snapshot package publisher

Snapshot package publisher #945

# Workflow to perform a snapshot release if continuous integration succeeded.
name: Snapshot package publisher
on:
workflow_run:
workflows: [ "Continuous Integration" ]
push:
branches:
- master
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Maven central repository
uses: actions/setup-java@v3
with:
java-version: 8
server-id: sonatype
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
distribution: 'adopt'
cache: maven
- name: publish packages
run: mvn --batch-mode -DskipTests javadoc:aggregate-jar deploy
env:
MAVEN_USERNAME: ${{ secrets.OSS_SONATYPE_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSS_SONATYPE_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}