0.9.13 General modernisation #23
This file contains hidden or 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
| # 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#apache-maven-with-a-settings-path | |
| name: Maven Package | |
| on: | |
| release: | |
| types: [published] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: 21 | |
| distribution: 'zulu' | |
| server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml | |
| server-username: MAVEN_USERNAME # env variable for username in deploy | |
| server-password: MAVEN_PASSWORD # env variable for token in deploy | |
| - name: Import GPG key | |
| run: | | |
| echo "${{ secrets.OSSRH_GPG_SECRET_KEY }}" | gpg --batch --import | |
| gpg --list-secret-keys --keyid-format LONG | |
| - name: Publish package | |
| run: mvn --no-transfer-progress --batch-mode -DperformRelease=true clean deploy | |
| env: | |
| MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
| MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} | |
| MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} |