Merge pull request #181 from DelineaXPM/platfromSupport #139
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: | |
| # Publish `v1.2.3` tags as releases. | |
| #tags: | |
| #- v* | |
| branches: | |
| - main | |
| jobs: | |
| push: | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'push' | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4 | |
| with: | |
| java-version: 17 | |
| gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} | |
| distribution: 'temurin' | |
| env: | |
| MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
| - name: Customize the Maven settings.xml | |
| uses: whelk-io/maven-settings-xml-action@9dc09b23833fa9aa7f27b63db287951856f3433d # v22 | |
| with: | |
| servers: '[{ "id": "ossrh", "username": "${{ secrets.SONATYPE_USERNAME }}", "password": "${{ secrets.SONATYPE_PASSWORD }}" }]' | |
| - name: Configure the application | |
| run: | | |
| properties="src/main/resources/application.properties" | |
| rm -f "${properties}" | |
| echo "secret_server.tenant = ${{ secrets.TSS_TENANT }}" >> "${properties}" | |
| echo "secret_server.oauth2.username = ${{ secrets.TSS_USERNAME }}" >> "${properties}" | |
| echo "secret_server.oauth2.password = ${{ secrets.TSS_PASSWORD }}" >> "${properties}" | |
| echo "secret.id = ${{ secrets.TSS_SECRET_ID }}" >> "${properties}" | |
| - name: Deploy with Maven | |
| run: | | |
| mvn -P sonatypeDeploy -B -ntp clean deploy | |
| env: | |
| MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} |