Skip to content

Maven Release Package #6

Maven Release Package

Maven Release Package #6

Workflow file for this run

name: Maven Release Package
on:
release:
types: [created]
# Add the workflow_dispatch event to enable manual triggering
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
server-id: ossrh # Server ID from your settings.xml
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} # Imported from GitHub secrets
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }} # Imported from GitHub secrets
- name: Build with Maven
run: mvn clean install -B -P release --file pax-sdk/pom.xml
- name: Sign and Deploy to OSSRH
run: mvn deploy -B -P release --settings pax-sdk/settings.xml --file pax-sdk/pom.xml
env:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}