v0.1-alpha-8 #14
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: Publish to Maven Central | |
| on: | |
| release: | |
| types: [ created ] | |
| jobs: | |
| publish: | |
| name: Publish to Maven Central | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: corretto | |
| server-id: central | |
| server-username: SERVER_USERNAME | |
| server-password: SERVER_PASSWORD | |
| gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} | |
| gpg-passphrase: GPG_PASSPHRASE | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install test file generator requirements | |
| run: | | |
| pip install -r test-requirements.txt | |
| - name: Locate Python | |
| id: locate-python | |
| run: echo "python-path=$(which python)" >> "$GITHUB_OUTPUT" | |
| - name: Set version from release tag | |
| run: mvn versions:set -DnewVersion="${REF_NAME#v}" | |
| env: | |
| REF_NAME: ${{ github.ref_name }} | |
| - name: Publish | |
| run: mvn --batch-mode deploy | |
| env: | |
| ASDF_JAVA_TESTS_PYTHON_PATH: ${{ steps.locate-python.outputs.python-path }} | |
| SERVER_USERNAME: ${{ secrets.CENTRAL_USERNAME }} | |
| SERVER_PASSWORD: ${{ secrets.CENTRAL_TOKEN }} | |
| GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} |