Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit aae3c86

Browse files
author
Alex Boten
committed
use tags to create a release branch
1 parent b87329b commit aae3c86

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.github/workflows/prepare-release.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ name: prepare-release
66
# events but only for the master branch
77
on:
88
push:
9-
branches: [ 'release/*' ]
9+
tags: [ 'release/*' ]
1010

1111
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1212
jobs:
@@ -20,9 +20,16 @@ jobs:
2020
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
2121
- uses: actions/checkout@v2
2222

23+
- name: Get the version
24+
id: get_version
25+
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
26+
2327
- name: Prepare the release
2428
run: |
25-
./scripts/prepare_release.sh
29+
./scripts/prepare_release.sh ${{ steps.get_version.outputs.VERSION }}
2630
2731
- name: Create Pull Request
2832
uses: peter-evans/[email protected]
33+
# team-reviewers: TODO: set this
34+
branch: ${{ steps.get_version.outputs.VERSION }}
35+
title: '[pre-release] Update changelogs, version [${{ steps.get_version.outputs.VERSION }}]'

scripts/prepare_release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
VERSION=`git rev-parse --abbrev-ref HEAD | cut -f 2 -d /`
3+
VERSION=`echo $1 | cut -f 2 -d /`
44
echo "Using version ${VERSION}"
55

66
# check the version matches expected versioning e.g

0 commit comments

Comments
 (0)