Support for access_token and reduce call to auth store (#517)
#430
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 Snaphosts | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| deploy-snapshots: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| packages: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Read Maven version | |
| id: maven-version | |
| run: echo "version=$(cat .github/vars/maven-version.txt)" >> $GITHUB_OUTPUT | |
| - name: Setup Maven Action | |
| uses: s4u/setup-maven-action@6c4e9964d4ecb8f1026310cd8618791fd51a8016 # v1.19.0 | |
| with: | |
| checkout-enabled: false | |
| java-distribution: 'temurin' | |
| java-version: 17 | |
| maven-version: ${{ steps.maven-version.outputs.version }} | |
| cache-enabled: true | |
| settings-servers: | | |
| [{ | |
| "id": "central-snapshots", | |
| "username": "${{ secrets.CENTRAL_USERNAME }}", | |
| "password": "${{ secrets.CENTRAL_PASSWORD }}" | |
| }] | |
| - name: Import GPG key | |
| uses: crazy-max/ghaction-import-gpg@e89d40939c28e39f97cf32126055eeae86ba74ec # v6.3.0 | |
| with: | |
| gpg_private_key: ${{ secrets.GPG_KEY }} | |
| passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
| - name: List keys | |
| run: gpg -K | |
| - name: Maven build | |
| run: mvn --batch-mode -Psign --update-snapshots -Dmaven.resolver.transport=wagon deploy | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2 | |
| with: | |
| files: target/site/jacoco/jacoco.xml | |
| token: ${{ secrets.CODECOV_TOKEN }} |