Maven Release Package #6
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
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 }} |