

























@@ -12,6 +12,11 @@ on:
1212required: true
1313default: true
1414type: boolean
15+public_release_branch:
16+description: Public branch that contains the release tag commit, usually main or release/YYYY.M.D
17+required: false
18+default: main
19+type: string
15201621concurrency:
1722group: macos-release-${{ inputs.tag }}
@@ -66,13 +71,17 @@ jobs:
6671 - name: Validate release tag and package metadata
6772env:
6873RELEASE_TAG: ${{ inputs.tag }}
69-WORKFLOW_REF_NAME: ${{ github.ref_name }}
74+PUBLIC_RELEASE_BRANCH: ${{ inputs.public_release_branch }}
7075run: |
7176 set -euo pipefail
77+ if [[ "${PUBLIC_RELEASE_BRANCH}" != "main" && ! "${PUBLIC_RELEASE_BRANCH}" =~ ^release/[0-9]{4}\.[1-9][0-9]*\.[1-9][0-9]*$ ]]; then
78+ echo "public_release_branch must be main or release/YYYY.M.D, got ${PUBLIC_RELEASE_BRANCH}." >&2
79+ exit 1
80+ fi
7281 RELEASE_SHA=$(git rev-parse HEAD)
73- RELEASE_MAIN_REF="refs/remotes/origin/${WORKFLOW_REF_NAME}"
82+ RELEASE_MAIN_REF="refs/remotes/origin/${PUBLIC_RELEASE_BRANCH}"
7483 export RELEASE_SHA RELEASE_TAG RELEASE_MAIN_REF
75- git fetch --no-tags origin "+refs/heads/${WORKFLOW_REF_NAME}:refs/remotes/origin/${WORKFLOW_REF_NAME}"
84+ git fetch --no-tags origin "+refs/heads/${PUBLIC_RELEASE_BRANCH}:refs/remotes/origin/${PUBLIC_RELEASE_BRANCH}"
7685 pnpm release:openclaw:npm:check
77867887 - name: Summarize next step
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。