Skip to content

Commit e9861d5

Browse files
authored
Add release branch workflow (#406)
Signed-off-by: Andreas Fritzler <andreas.fritzler@sap.com>
1 parent 74aa866 commit e9861d5

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Create Release Branch
2+
3+
on:
4+
push:
5+
tags:
6+
- "v[0-9]+.[0-9]+.0"
7+
8+
jobs:
9+
create-release-branch:
10+
name: Create release branch
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
14+
steps:
15+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
16+
- name: Create release branch
17+
run: |
18+
TAG="${GITHUB_REF#refs/tags/}"
19+
# Extract major.minor from tag (e.g. v0.1.0 -> release-v0.1)
20+
BRANCH="release-${TAG%.*}"
21+
git switch -c "${BRANCH}"
22+
git push origin "${BRANCH}"

0 commit comments

Comments
 (0)