Skip to content

Create release branch 8.4.0 #19

Create release branch 8.4.0

Create release branch 8.4.0 #19

name: Create release branch
run-name: Create release branch ${{ inputs.version }}
on:
workflow_dispatch:
inputs:
version:
description: 'Full semantic version number of the next minor release, e.g. 8.4.0'
required: true
jobs:
create-release-branch:
name: Create release branch ${{ inputs.version }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}
fetch-depth: 0
- name: Restore cache
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Prepare Java and Maven settings
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Set snapshot version on release branch
id: set-snapshot-version
run: |
MINOR_VERSION=${RELEASE_VERSION%.*}
mvn -B versions:set -DnewVersion=${RELEASE_VERSION}-SNAPSHOT -DgenerateBackupPoms=false -f parent
echo "branchName=release/${RELEASE_VERSION%.*}" >> $GITHUB_OUTPUT
env:
RELEASE_VERSION: ${{ github.event.inputs.version }}
- name: Create pull request to main branch
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ steps.set-snapshot-version.outputs.branchName }}
commit-message: "ci: set next snapshot version"
committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
base: main
title: "ci: set next snapshot version"
body: |
This PR sets the next snapshot version on the main branch.
Checklist:
- [ ] the PR should be accepted via the "Rebase and merge" option
- [ ] the branch must **not** be deleted after merging
- [ ] the PR contains exactly one commit with the version change
If this PR has conflicts, re-run the `Create release branch` workflow. No need to close the PR or delete the branch.
env:
RELEASE_VERSION: ${{ github.event.inputs.version }}