@@ -21,6 +21,7 @@ const requiredFiles = [
2121 "docs/release/h5-owner-decision-memo.md" ,
2222 "docs/release/h6-owner-decision-memo.md" ,
2323 "docs/release/known-issues.md" ,
24+ "docs/release/native-workflow-runbook.md" ,
2425 "docs/release/native-qa-checklists.md" ,
2526 "docs/release/native-performance-benchmark.md" ,
2627 "docs/release/native-release-checks.md" ,
@@ -586,6 +587,11 @@ addCheck({
586587} ) ;
587588
588589const publishWorkflowSource = await readRepoFile ( ".github/workflows/publish.yml" ) ;
590+ const publishAuthEnvCount = (
591+ publishWorkflowSource . match (
592+ / N O D E _ A U T H _ T O K E N : \s * \$ \{ \{ \s * s e c r e t s \. N P M _ T O K E N \s * \} \} / g
593+ ) ?? [ ]
594+ ) . length ;
589595const publishWorkflowSafetyChecks = [
590596 "secrets.NPM_TOKEN" ,
591597 "NODE_AUTH_TOKEN" ,
@@ -597,6 +603,12 @@ const publishWorkflowSafetyChecks = [
597603 "npm publish \"${PUBLISH_TARGET}\" --ignore-scripts --access public --provenance --tag"
598604] . filter ( ( needle ) => ! publishWorkflowSource . includes ( needle ) ) ;
599605
606+ if ( publishAuthEnvCount < 2 ) {
607+ publishWorkflowSafetyChecks . push (
608+ "NODE_AUTH_TOKEN must be set for npm auth preflight and npm publish"
609+ ) ;
610+ }
611+
600612addCheck ( {
601613 detail :
602614 publishWorkflowSafetyChecks . length > 0
0 commit comments