Skip to content

Maven Package

Maven Package #26

Workflow file for this run

# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path
name: Maven Package
on:
push:
branches: [ master ]
paths:
- '**/*.java'
- '**/*.pom'
workflow_dispatch:
inputs:
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{secrets.GPG_PRIVATE_KEY}}
gpg-passphrase: GPG_PASSPHRASE
- name: Publish Package
run: mvn --batch-mode clean deploy
env:
MAVEN_USERNAME: ${{secrets.MAVEN_USERNAME}}
MAVEN_PASSWORD: ${{secrets.MAVEN_PASSWORD}}
GPG_PASSPHRASE: ${{secrets.GPG_PASSPHRASE}}