chore: allow token for sigstore #2
Workflow file for this run
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: | |
| tags: | |
| - 'v*' | |
| # Token for sigstore | |
| permissions: | |
| id-token: write | |
| contents: read | |
| jobs: | |
| deploy: | |
| name: Deploy Release | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| issues: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| submodules: true | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| cache: 'maven' | |
| server-id: central | |
| server-username: ${{ secrets.MAVEN_CENTRAL_USERNAME }} | |
| server-password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} | |
| gpg-private-key: ${{ secrets.GPG_ARMOR_KEY }} | |
| gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
| - name: Deploy Maven package | |
| # Locally run instead: mvn clean deploy -DskipTests -Pdeploy -Dgpg.passphrase="" | |
| run: mvn deploy -B -Pdeploy -Dgpg.signer=bc -DskipTests | |
| env: | |
| MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }} | |
| MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} | |
| MAVEN_GPG_KEY: ${{ secrets.GPG_ARMOR_KEY }} | |
| MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
| - name: JReleaser Release | |
| run: mvn jreleaser:full-release -B -Pdeploy | |
| env: | |
| TAG_NAME: ${{ github.ref }} | |
| JRELEASER_PROJECT_VERSION: ${{ github.ref }} | |
| JRELEASER_JBANG_GITHUB_TOKEN: ${{ secrets.JBANG_CATALOG_TOKEN }} | |
| JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |