testing deploy action #10
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
| name: Deploy | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| release: | |
| types: [ created ] | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out git repository | |
| uses: actions/checkout@v4 | |
| - name: Install java and maven | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'zulu' | |
| java-version: '11' | |
| gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} | |
| gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
| - name: Test Maven package | |
| run: mvn -B test --file pom.xml | |
| - name: Build Maven package | |
| run: mvn -B package --file pom.xml -DskipTests | |
| - name: Publish Sonatype | |
| run: mvn --batch-mode deploy -DskipTests | |
| env: | |
| MAVEN_USERNAME: ${{ secrets.CENTRAL_TOKEN_USERNAME }} | |
| MAVEN_PASSWORD: ${{ secrets.CENTRAL_TOKEN_PASSWORD }} | |
| MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} |