Create release branch and tag #35
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: Create release branch and tag | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| releaseVersion: | |
| description: "Default version to use when preparing a release." | |
| required: true | |
| default: "X.Y" | |
| developmentVersion: | |
| description: "Default version to use for new local working copy." | |
| required: true | |
| default: "X.Y-SNAPSHOT" | |
| env: | |
| RELEASE_VERSION: ${{ github.event.inputs.releaseVersion }} | |
| DEVELOPMENT_VERSION: ${{ github.event.inputs.developmentVersion }} | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 | |
| - name: Switch git branch | |
| run: git switch -c release-${{ env.RELEASE_VERSION }} | |
| - name: Install Node | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e | |
| with: | |
| node-version: "20.x" | |
| - name: Set up JDK | |
| uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520 | |
| with: | |
| java-version: 17 | |
| java-package: jdk | |
| distribution: temurin | |
| cache: 'maven' | |
| - name: Configure git | |
| run: | | |
| git config committer.email "infra@finos.org" | |
| git config committer.name "FINOS Admin" | |
| git config author.email "${GITHUB_ACTOR}@users.noreply.github.com" | |
| git config author.name "${GITHUB_ACTOR}" | |
| - name: Setup SSH Access for Commit | |
| uses: kielabokkie/ssh-key-and-known-hosts-action@242f53d26bbd43e843b08b0cbc8287ceb03fbe71 | |
| with: | |
| ssh-private-key: ${{ secrets.COMMIT_SSH_PRIVATE_KEY }} | |
| ssh-host: github.com | |
| - name: Make mvnw executable | |
| run: chmod +x mvnw | |
| - name: Maven create release branch and tag | |
| run: ./mvnw -B -ntp release:prepare -DreleaseVersion=${{ env.RELEASE_VERSION }} -DdevelopmentVersion=${{ env.DEVELOPMENT_VERSION }} |