-
Notifications
You must be signed in to change notification settings - Fork 2
27 lines (23 loc) · 929 Bytes
/
branch.yml
File metadata and controls
27 lines (23 loc) · 929 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
name: 'create release branch'
on:
workflow_dispatch:
jobs:
branch:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
env:
MAVEN_ARGS: '--no-transfer-progress'
steps:
- uses: actions/checkout@v6
- uses: oleksiyrudenko/gha-git-credentials@v2-latest
with:
global: true
name: 'github $GITHUB_ACTOR'
email: 'digitaal-techniek@vpro.nl'
token: '${{ secrets.GITHUB_TOKEN }}'
- name: Release branch with Maven
run: |
VERSION=`mvn help:evaluate -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 -DupdateBranchVersions=true -DreleaseVersion=${RELEASE_VERSION} -DdevelopmentVersion=${DEVELOPMENT_VERSION} release:branch