Skip to content

Commit 1e044df

Browse files
committed
fix(github-actions): revert wrong changes
1 parent be25d4b commit 1e044df

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

.github/workflows/release.yaml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ on:
1010
env:
1111
BRANCH_MAIN: main
1212
BRANCH_DEVELOP: develop
13-
BRANCH_RELEASE_PREFIX: release
14-
BRANCH_HOTFIX_PREFIX: hotfix
1513
TAG_PREFIX: v
1614

1715
jobs:
@@ -22,7 +20,7 @@ jobs:
2220
contents: write
2321
# only merge pull requests that begin with 'release/' or 'hotfix/'
2422
if: github.event.pull_request.merged == true &&
25-
(startsWith(github.head_ref, '${{ env.BRANCH_RELEASE_PREFIX }}/') || startsWith(github.head_ref, '${{ env.BRANCH_HOTFIX_PREFIX }}/'))
23+
(startsWith(github.head_ref, 'release/') || startsWith(github.head_ref, 'hotfix/'))
2624

2725
steps:
2826
- name: Set GitHub token
@@ -36,17 +34,17 @@ jobs:
3634
token: ${{ env.GH_TOKEN }}
3735

3836
- name: Extract version from release branch
39-
if: startsWith(github.head_ref, '${{ env.BRANCH_RELEASE_PREFIX }}/')
37+
if: startsWith(github.head_ref, 'release/')
4038
run: |
4139
BRANCH_NAME="${{ github.head_ref }}"
42-
VERSION=${BRANCH_NAME#${{ env.BRANCH_RELEASE_PREFIX }}/}
40+
VERSION=${BRANCH_NAME#release/}
4341
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
4442
4543
- name: Extract version from hotfix branch
46-
if: startsWith(github.head_ref, '${{ env.BRANCH_HOTFIX_PREFIX }}/')
44+
if: startsWith(github.head_ref, 'hotfix/')
4745
run: |
4846
BRANCH_NAME="${{ github.head_ref }}"
49-
VERSION=${BRANCH_NAME#${{ env.BRANCH_HOTFIX_PREFIX }}/}
47+
VERSION=${BRANCH_NAME#hotfix/}
5048
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
5149
5250
- name: Create release

0 commit comments

Comments
 (0)