ci(release): allow public mac validation from main

This commit is contained in:
Peter Steinberger
2026-04-30 22:53:39 +01:00
parent f48f31aac9
commit 231e5c618f
2 changed files with 15 additions and 4 deletions

View File

@@ -12,6 +12,11 @@ on:
required: true
default: true
type: boolean
public_release_branch:
description: Public branch that contains the release tag commit, usually main or release/YYYY.M.D
required: false
default: main
type: string
concurrency:
group: macos-release-${{ inputs.tag }}
@@ -66,13 +71,17 @@ jobs:
- name: Validate release tag and package metadata
env:
RELEASE_TAG: ${{ inputs.tag }}
WORKFLOW_REF_NAME: ${{ github.ref_name }}
PUBLIC_RELEASE_BRANCH: ${{ inputs.public_release_branch }}
run: |
set -euo pipefail
if [[ "${PUBLIC_RELEASE_BRANCH}" != "main" && ! "${PUBLIC_RELEASE_BRANCH}" =~ ^release/[0-9]{4}\.[1-9][0-9]*\.[1-9][0-9]*$ ]]; then
echo "public_release_branch must be main or release/YYYY.M.D, got ${PUBLIC_RELEASE_BRANCH}." >&2
exit 1
fi
RELEASE_SHA=$(git rev-parse HEAD)
RELEASE_MAIN_REF="refs/remotes/origin/${WORKFLOW_REF_NAME}"
RELEASE_MAIN_REF="refs/remotes/origin/${PUBLIC_RELEASE_BRANCH}"
export RELEASE_SHA RELEASE_TAG RELEASE_MAIN_REF
git fetch --no-tags origin "+refs/heads/${WORKFLOW_REF_NAME}:refs/remotes/origin/${WORKFLOW_REF_NAME}"
git fetch --no-tags origin "+refs/heads/${PUBLIC_RELEASE_BRANCH}:refs/remotes/origin/${PUBLIC_RELEASE_BRANCH}"
pnpm release:openclaw:npm:check
- name: Summarize next step

View File

@@ -194,7 +194,9 @@ Validation` or from the `main`/release workflow ref so workflow logic and
`openclaw/releases-private/.github/workflows/openclaw-npm-dist-tags.yml`
for security, because `npm dist-tag add` still needs `NPM_TOKEN` while the
public repo keeps OIDC-only publish
- public `macOS Release` is validation-only
- public `macOS Release` is validation-only; when a tag lives only on a
release branch but the workflow is dispatched from `main`, set
`public_release_branch=release/YYYY.M.D`
- real private mac publish must pass successful private mac
`preflight_run_id` and `validate_run_id`
- the real publish paths promote prepared artifacts instead of rebuilding