mirror of
https://github.com/we-promise/sure.git
synced 2026-08-03 23:52:13 +00:00
fix(ci): quote prerelease tag source branch lookup
This commit is contained in:
4
.github/workflows/publish.yml
vendored
4
.github/workflows/publish.yml
vendored
@@ -426,6 +426,8 @@ jobs:
|
||||
steps:
|
||||
- name: Determine source branch for tag
|
||||
id: source_branch
|
||||
env:
|
||||
TAG_NAME: ${{ github.ref_name }}
|
||||
run: |
|
||||
# Fetch all branches to find which one contains this tag's commit
|
||||
git init --quiet
|
||||
@@ -439,7 +441,7 @@ jobs:
|
||||
# Prefer the matching release branch over main. Do not select arbitrary
|
||||
# feature or PR branches that happen to contain the tagged commit.
|
||||
SOURCE_BRANCH="main"
|
||||
RELEASE_BRANCH="$(echo "${{ github.ref_name }}" | sed -E 's/^v([0-9]+)\.([0-9]+)\..*/v\1.\2-release-branch/')"
|
||||
RELEASE_BRANCH="$(printf '%s\n' "$TAG_NAME" | sed -E 's/^v([0-9]+)\.([0-9]+)\..*/v\1.\2-release-branch/')"
|
||||
|
||||
for branch in $BRANCHES; do
|
||||
if [ "$branch" = "$RELEASE_BRANCH" ]; then
|
||||
|
||||
Reference in New Issue
Block a user