Prepare Release to Maven Central #9
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: Prepare Release to Maven Central | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| releaseVersion: | |
| description: 'Release and tag version' | |
| required: true | |
| default: "v1.5.0" | |
| developmentVersion: | |
| description: 'Version to use for new working copy' | |
| required: true | |
| default: '2.0.0-SNAPSHOT' | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| with: | |
| ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
| - name: Set up JDK 8 | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'zulu' | |
| java-version: '8' | |
| cache: 'maven' | |
| - name: Configure Git user | |
| run: | | |
| git config user.email "actions@github.com" | |
| git config user.name "GitHub Actions" | |
| - name: Run release release.yml | |
| env: | |
| GITHUB_ACTOR: ${{ github.actor }} | |
| GITHUB_TOKEN: ${{ github.token }} | |
| RELEASE_VERSION: ${{ github.event.inputs.releaseVersion }} | |
| DEVELOPMENT_VERSION: ${{ github.event.inputs.developmentVersion }} | |
| run: | | |
| ./mvnw release:prepare -DskipTests -Darguments=-DskipTests \ | |
| -DreleaseVersion="$RELEASE_VERSION" -Dtag="$RELEASE_VERSION" \ | |
| -DdevelopmentVersion="$DEVELOPMENT_VERSION" |