build: fix prepare release #14
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 Snapshot to Maven Central | |
| on: | |
| push: | |
| branches: | |
| - master | |
| tags: | |
| - 'v[0-9]+.[0-9]+.[0-9]+\-dev.[0-9]+' | |
| jobs: | |
| publish-snapshot: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Set up JDK 8 | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'zulu' | |
| java-version: '8' | |
| cache: 'maven' | |
| server-id: central-portal-snapshots | |
| server-username: MAVEN_USERNAME | |
| server-password: MAVEN_TOKEN | |
| - name: Publish Snapshot to Maven Central | |
| run: | | |
| ./mvnw -B clean deploy -PsonatypeSnapshot -DskipTests | |
| env: | |
| MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_USER }} | |
| MAVEN_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }} |