Skip to content

Commit 1ef9f18

Browse files
committed
[build] fix release so it works from PR as well as workflow dispatch
1 parent 9dee74a commit 1ef9f18

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/stage-release.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ on:
1111

1212
env:
1313
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14-
BRANCH_NAME: ${{ github.event.pull_request.head.ref }}
1514

1615
jobs:
1716
github-release:
@@ -32,7 +31,8 @@ jobs:
3231
- name: Extract version from branch name
3332
if: github.event.pull_request.merged == true
3433
run: |
35-
VERSION=$(echo $BRANCH_NAME | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')
34+
TEMP_BRANCH_NAME=${{ github.event.pull_request.head.ref }}
35+
VERSION=$(echo $TEMP_BRANCH_NAME | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')
3636
echo "VERSION=$VERSION" >> $GITHUB_ENV
3737
- name: Extract version from workflow input
3838
if: github.event_name == 'workflow_dispatch'

0 commit comments

Comments
 (0)