Skip to content

Commit 7e21cd3

Browse files
committed
fix(release): defer registry and public publication by default
1 parent baee51a commit 7e21cd3

5 files changed

Lines changed: 41 additions & 1 deletion

File tree

‎.github/workflows/promote-qualified-release.yml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ on:
77
description: "Existing DRAFT release tag qualified on luigi.home.arpa (vX.Y.Z or prerelease)"
88
required: true
99
type: string
10+
publish_registries:
11+
description: "Publish npm/PyPI packages and make the GitHub release public (requires registry credentials)"
12+
required: false
13+
type: boolean
14+
default: false
1015

1116
permissions:
1217
contents: read
@@ -51,6 +56,7 @@ jobs:
5156
--expected-source-commit "$SOURCE_COMMIT"
5257
5358
publish-registries:
59+
if: ${{ !cancelled() && needs.verify-external-qualification.result == 'success' && inputs.publish_registries }}
5460
needs: [verify-external-qualification]
5561
runs-on: ubuntu-latest
5662
permissions:
@@ -103,6 +109,7 @@ jobs:
103109
twine upload --non-interactive --skip-existing dist/*
104110
105111
publish-final:
112+
if: ${{ !cancelled() && needs.verify-external-qualification.result == 'success' && needs.publish-registries.result == 'success' && inputs.publish_registries }}
106113
needs: [verify-external-qualification, publish-registries]
107114
runs-on: ubuntu-latest
108115
permissions:

‎.github/workflows/release.yml‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ on:
3636
required: false
3737
type: boolean
3838
default: true
39+
publish_registries:
40+
description: "Publish npm/PyPI packages and make the GitHub release public (requires registry credentials)"
41+
required: false
42+
type: boolean
43+
default: false
3944

4045
permissions:
4146
contents: read
@@ -456,7 +461,7 @@ jobs:
456461
# release stays in draft so we can re-run without a half-shipped state.
457462
publish-registries:
458463
needs: [verify]
459-
if: ${{ !cancelled() && !failure() && needs.verify.result == 'success' && !inputs.hold_for_external_qualification }}
464+
if: ${{ !cancelled() && !failure() && needs.verify.result == 'success' && !inputs.hold_for_external_qualification && inputs.publish_registries }}
460465
runs-on: ubuntu-latest
461466
permissions:
462467
contents: read

‎BACKLOG.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,8 @@
8080
is all-platform and its default Windows qualification hold remains in force.
8181
Setting that hold to false is not a Linux-only release mode. See the canonical
8282
upstream ledger's Linux publication readiness audit for live configuration evidence.
83+
84+
- [ ] Public/registry publication is deferred by maintainer instruction.
85+
`publish_registries=false` is now the default in release and promotion CI;
86+
npm/PyPI credentials are only required when opting in. Draft qualification
87+
still requires VirusTotal and applicable Windows evidence.

‎docs/UPSTREAM_308_CANDIDATE_AUDIT_20260912.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,3 +250,10 @@ Publication blockers in the existing all-platform `release.yml`:
250250
Obtain the service credentials through their providers and supply a local
251251
credential-file or secret-manager reference for secure GitHub secret setup.
252252
Do not commit token values or remove release checks to bypass missing secrets.
253+
254+
Maintainer update: defer all public/registry publication. Both release and
255+
promotion workflows now expose `publish_registries` with default false.
256+
Default dispatches skip npm/PyPI jobs and public un-drafting, so registry
257+
credentials are not required to create/verify a draft candidate. VirusTotal
258+
and the external qualification hold remain unchanged. Publication is still
259+
blocked until explicitly opted in, with credentials and qualification evidence.

‎tests/test_release_gate_chain_contract.sh‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,22 @@ for token in ("release-candidates.tsv", "virustotal-candidate-results.tsv",
354354
failures.append(
355355
f"release verify: existing candidate evidence is not reused: {token}")
356356
357+
# Registry publication is opt-in in both entry points; default runs stay draft.
358+
for workflow_name in ("release.yml", "promote-qualified-release.yml"):
359+
source = pathlib.Path(sys.argv[1]).with_name(workflow_name).read_text()
360+
option = re.search(r"^ publish_registries:\s*\n(?P<body>(?:^ .*\n?)*)", source, re.M)
361+
if not option or not re.search(r"^ default: false$", option.group("body"), re.M):
362+
failures.append(f"{workflow_name}: publishing must default to false")
363+
jobs = workflow_jobs(source)
364+
registry = jobs.get("publish-registries", "")
365+
condition = re.search(r"^ if:.*$", registry, re.M)
366+
if not condition or "inputs.publish_registries" not in condition.group():
367+
failures.append(f"{workflow_name}: registry job must require publishing opt-in")
368+
final = jobs.get("publish-final", "")
369+
condition = re.search(r"^ if:.*$", final, re.M)
370+
if not condition or "needs.publish-registries.result == 'success'" not in condition.group():
371+
failures.append(f"{workflow_name}: public release requires registry success")
372+
357373
if failures:
358374
for f in failures:
359375
print("FAIL: " + f, file=sys.stderr)

0 commit comments

Comments
 (0)