You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ci(release): build npm packages without credentials and publish from a protected job - #814
Separates TypeScript package builds from npm publishing.release-typescript.yml runs with contents: read, persist-credentials: false, and no publishing secrets; it installs dependencies with --frozen-lockfile --ignore-scripts, stages tarballs, runs the clean-install smoke check, and uploads the npm-packages artifact only when steps.verify.outputs.verified == 'true'. A separate top-level typescript job in release.yml runs in the protected npm-publish environment, depends on typescript-build succeeding with verified == 'true', holds NPM_TOKEN and id-token: write, downloads those exact verified tarballs, and publishes them in dependency order with provenance.
Prevents cross-ecosystem ambiguity in --only selection and tags..github/release/release_plan.py refuses an ambiguous plain --only NAME when that name exists in more than one ecosystem (exit 2 with a hint to pass ECOSYSTEM:NAME), accepts ECOSYSTEM:NAME selection, and checks in --check that every release tag is unique across ecosystems.
Verifies built Ruby gems before uploading them.ruby-build installs the built .gem into a clean GEM_HOME with --local --ignore-dependencies --no-document, checks its name, version, and packaged file list against the built gem specification without loading agent code, and uploads the artifact only when steps.verify.outputs.verified == 'true'.
Sets 1-day artifact retention across release and test workflows. Every actions/upload-artifact step across the release and test workflows sets retention-days: 1.
Updates RELEASING.md with the npm-publish environment setup and approval step, 1-day artifact retention guidance, ecosystem:name selection, and the Ruby pre-upload verification step.
Why?
The Python, NuGet, and Ruby release pipelines already separated credential-free builds from protected publish jobs, while TypeScript built and published inside a single job with secrets: inherit. In addition, --only matched package names without ecosystem qualification, Ruby uploaded gems before checking the built artifact, and workflow artifacts kept the default 90-day retention.
How was it tested?
unittest discover .github/release: 149 passed, 0 failed, 1 skipped (including new test_a_selected_name_publishes_to_one_ecosystem_only, which fails before this change and passes after).
python3 .github/release/release_plan.py --check, bootstrap_audit.py --check, and release_plan.py --offline: exit 0.
actionlint (with shellcheck): 0 new findings.
Static YAML policy check across workflows: verifies credential isolation, protected environment, retention-days: 1 on all 21 upload-artifact steps, and publish dependency on verified build outputs.
Clean-container checks for Ruby gem verification (valid gems pass; wrong-version and missing-file controls fail) and TypeScript stage + verify + tarball layout round-trip without credentials.
Unit tests added / updated (unittest)
Workflow lint (actionlint) passes with 0 new findings
Release documentation updated (RELEASING.md)
Checklist
Commit messages follow Conventional Commits
No TODOs or commented-out code left in
No real API keys or secrets in the diff
If prose was added or changed: checked against docs/VOCABULARY.md
Notes for reviewers
Targets dev.
Required before merge
Create the npm-publish GitHub environment with required reviewers and deployment branches restricted to main (otherwise GitHub creates an unprotected environment on first run).
Set npm trusted publishers to use environment npm-publish.
What does this PR do?
release-typescript.ymlruns withcontents: read,persist-credentials: false, and no publishing secrets; it installs dependencies with--frozen-lockfile --ignore-scripts, stages tarballs, runs the clean-install smoke check, and uploads thenpm-packagesartifact only whensteps.verify.outputs.verified == 'true'. A separate top-leveltypescriptjob inrelease.ymlruns in the protectednpm-publishenvironment, depends ontypescript-buildsucceeding withverified == 'true', holdsNPM_TOKENandid-token: write, downloads those exact verified tarballs, and publishes them in dependency order with provenance.--onlyselection and tags..github/release/release_plan.pyrefuses an ambiguous plain--only NAMEwhen that name exists in more than one ecosystem (exit 2 with a hint to passECOSYSTEM:NAME), acceptsECOSYSTEM:NAMEselection, and checks in--checkthat every release tag is unique across ecosystems.ruby-buildinstalls the built.geminto a cleanGEM_HOMEwith--local --ignore-dependencies --no-document, checks its name, version, and packaged file list against the built gem specification without loading agent code, and uploads the artifact only whensteps.verify.outputs.verified == 'true'.actions/upload-artifactstep across the release and test workflows setsretention-days: 1.RELEASING.mdwith thenpm-publishenvironment setup and approval step, 1-day artifact retention guidance,ecosystem:nameselection, and the Ruby pre-upload verification step.Why?
The Python, NuGet, and Ruby release pipelines already separated credential-free builds from protected publish jobs, while TypeScript built and published inside a single job with
secrets: inherit. In addition,--onlymatched package names without ecosystem qualification, Ruby uploaded gems before checking the built artifact, and workflow artifacts kept the default 90-day retention.How was it tested?
unittest discover .github/release: 149 passed, 0 failed, 1 skipped (including newtest_a_selected_name_publishes_to_one_ecosystem_only, which fails before this change and passes after)..github/scriptstest suite: 65 passed, 0 failed.test_release_strategies.cjs(offlinerelease-pleasestrategy check): 1 passed, 0 failed.python3 .github/release/release_plan.py --check,bootstrap_audit.py --check, andrelease_plan.py --offline: exit 0.actionlint(withshellcheck): 0 new findings.Static YAML policy check across workflows: verifies credential isolation, protected
environment,retention-days: 1on all 21upload-artifactsteps, and publish dependency on verified build outputs.Clean-container checks for Ruby gem verification (valid gems pass; wrong-version and missing-file controls fail) and TypeScript
stage+verify+ tarball layout round-trip without credentials.Unit tests added / updated (
unittest)Workflow lint (
actionlint) passes with 0 new findingsRelease documentation updated (
RELEASING.md)Checklist
docs/VOCABULARY.mdNotes for reviewers
Targets
dev.Required before merge
npm-publishGitHub environment with required reviewers and deployment branches restricted tomain(otherwise GitHub creates an unprotected environment on first run).npm-publish.