Release #46
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: Release | |
| permissions: | |
| contents: write | |
| on: workflow_dispatch | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/cache@v4 | |
| with: | |
| path: ~/.m2/repository | |
| key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-maven- | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: 21 | |
| distribution: zulu | |
| - uses: whelk-io/maven-settings-xml-action@v22 | |
| with: | |
| servers: > | |
| [ | |
| { "id": "sonatype", "username": "${{ secrets.MAVEN_CENTRAL_TOKEN_USER }}", "password": "${{ secrets.MAVEN_CENTRAL_TOKEN_PASS }}" } | |
| ] | |
| - run: git config --global user.name phocasadmin; git config --global user.email [email protected] | |
| - name: add key | |
| run: | | |
| echo "${{ secrets.MAVEN_PRIVATE_KEY }}" | base64 -d > private.key | |
| gpg --batch --import ./private.key | |
| rm ./private.key | |
| gpg --list-secret-keys --keyid-format LONG | |
| - name: prepare | |
| run: | | |
| mvn release:prepare -Dusername=${{ secrets.ACTION_GITHUB_RELEASE_TOKEN }} -P sonatype -Darguments="-DpushChanges=true -DscmCommentPrefix='[ci skip]' -DremoteTagging=true" -DscmForceUpdate=true | |
| - name: release | |
| run: | | |
| mvn release:perform -Dusername=${{ secrets.ACTION_GITHUB_RELEASE_TOKEN }} -P sonatype -Darguments="-DpushChanges=true -DscmCommentPrefix='[ci skip]' -DremoteTagging=true" -DscmForceUpdate=true |