Skip to content

create release branch #5

create release branch

create release branch #5

Workflow file for this run

---
name: create release branch
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3
- uses: oleksiyrudenko/[email protected]
with:
global: true
name: 'github'
email: '[email protected]'
token: '${{ secrets.GITHUB_TOKEN }}'
- name: Release branch with Maven
run: |
VERSION=`mvn help:evaluate -ntp -Dexpression=project.version -q -DforceStdout`
RELEASE_VERSION=`echo $VERSION | sed -r 's/-SNAPSHOT/.0-SNAPSHOT/'`
DEVELOPMENT_VERSION=`echo $VERSION | gawk 'match($1, /([0-9]+)\.([0-9]+)([\.-])(.*)/, a) {print a[1]"."(a[2]+1)a[3]a[4]}'`
mvn -ntp -DupdateBranchVersions=true -DreleaseVersion=${RELEASE_VERSION} -DdevelopmentVersion=${DEVELOPMENT_VERSION} release:branch