Snapshot package publisher #774
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Workflow to perform a snapshot release if continuous integration succeeded. | |
name: Snapshot package publisher | |
on: | |
workflow_run: | |
workflows: [ "Java CI with Maven" ] | |
types: [completed] | |
push: | |
branches: [ develop ] | |
tags: [ 'v*' ] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'true' | |
- name: Set up Maven central repository | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '11' | |
distribution: 'temurin' | |
server-id: ossrh | |
server-username: MAVEN_USERNAME | |
server-password: MAVEN_PASSWORD | |
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} | |
gpg-passphrase: MAVEN_GPG_PASSPHRASE | |
- name: publish packages | |
run: mvn -P ossrhDeploy --batch-mode -DskipTests javadoc:aggregate-jar source:jar deploy | |
env: | |
MAVEN_USERNAME: ${{ secrets.OSS_SONATYPE_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.OSS_SONATYPE_PASSWORD }} | |
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} |