Skip to content

chore(release): use Yarn trusted publishing with OIDC - #760

Open
bhabalan wants to merge 2 commits into
webex:nextfrom
bhabalan:codex/cai-8749-npm-oidc
Open

bhabalan wants to merge 2 commits into
webex:nextfrom
bhabalan:codex/cai-8749-npm-oidc

Conversation

@bhabalan

@bhabalan bhabalan commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

COMPLETES #CAI-8749

This pull request addresses

Deploy CD publishes npm packages with a saved npm token. This change uses native Yarn trusted publishing through GitHub OIDC for all ten released workspaces. It is the Widgets repository change under CAI-8748.

The npm owner can configure trusted publishers while this draft is reviewed. The first successful OIDC release is still required to complete CAI-8749.

by making the following changes

  • Upgrade the pinned and vendored Yarn CLI from 4.5.1 to 4.10.3, which includes the native OIDC fix for scoped packages. The lockfile changes only Yarn's built-in TypeScript patch hash and checksum; TypeScript remains 5.7.2 and dependency versions are unchanged.
  • Keep all existing deploy:npm: yarn npm publish workspace scripts and package selection. Grant id-token: write only to publish-npm, retain contents: read, and remove the npm publish-token reference.
  • Add --provenance only to the release command and repository metadata to the nine Contact Center manifests. Preserve version preparation, the next dist-tag, public access, consumer build checks, workspace-content verification, and publication checks before release tags.
  • Document npm owner setup, first-release validation, token cleanup, and recovery in ai-docs/RELEASING.md.

Change Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Tooling change
  • Internal code refactor

The following scenarios were tested

  • The testing is done with the amplify link
  • Immutable Yarn 4.10.3 install, production build, and development build passed.
  • Candidate packing and restored-workspace verification passed. Packed Contact Center manifests retain the repository URL and have resolved internal workspace dependencies.
  • Native Yarn dry runs passed for all ten workspaces with network access disabled and publish-token variables unset. Each reported the next tag, public access, and no publication.
  • The two native OIDC integration tests passed using the actual pinned Yarn CLI and loopback fixtures. They verify GitHub token audience, scoped-package token exchange, short-lived-token upload, next/public settings, and rejection before upload when exchange is denied. No real GitHub or npm authorization endpoint is used.
  • The six release-workflow tests passed. They cover prepared versions, deployment arguments, failure handling, release gates, OIDC permission scope, token removal, and consistent Yarn pins.
  • actionlint and formatting checks passed.
  • Consumer builds and Chromium startup checks passed for Webpack, Vite, Parcel, Rollup, and esbuild. All five reports match the same nine production package identities and SHA-256 hashes.
  • Full pre-commit unit and style checks passed with Yarn 4.10.3. The suite retains seven existing skipped tests; styles reported six warnings in the unchanged Web Component sample.
  • Live OIDC authorization and publishing: pending npm owner setup and the first release. No package was published during local validation.

npm owner setup and merge gate

For each package listed in ai-docs/RELEASING.md, add a GitHub Actions trusted publisher with organization webex, repository widgets, workflow filename deploy.yml, no environment, and Allow npm publish enabled.

  • npm owner confirms entries for every package selected for the first release.
  • Required PR checks pass.
  • Coordinate merge with the first release. Each new package trust entry needs its first successful publish within two days after creation. Entries for packages that do not release in that window must be created later or recreated before use.

Keep this PR as a draft until these prerequisites are met. After the first successful token-free release, record the run and package results in CAI-8749 before removing obsolete Widgets secrets. Revoke a shared npm token only after all repositories and workflows that use it have migrated.

The GAI Coding Policy And Copyright Annotation Best Practices

  • GAI was not used (or, no additional notation is required)
  • Code was generated entirely by GAI
  • GAI was used to create a draft that was subsequently customized or modified
  • Coder created a draft manually that was non-substantively modified by GAI (e.g., refactoring was performed by GAI on manually written code)
  • Tool used for AI assistance (GitHub Copilot / Other - specify)
    • Github Copilot
    • Other - OpenAI Codex
  • This PR is related to
    • Feature
    • Defect fix
    • Tech Debt
    • Automation

OpenAI Codex prepared the configuration, tests, and documentation. The vendored Yarn CLI is the unmodified official distribution. Existing license declarations are retained. Maintainer review is required before merge.

Checklist before merging

  • I have not skipped any automated checks
  • All existing and new tests passed
  • I have updated the testing document
  • I have tested the functionality with amplify link

Amplify validation does not apply to this release-tooling change.

@bhabalan bhabalan added the validated Indicates that the PR is ready for actions label Nov 17, 2026
@aws-amplify-us-east-2

Copy link
Copy Markdown

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-760.d1b38q61t1z947.amplifyapp.com

@bhabalan bhabalan removed the validated Indicates that the PR is ready for actions label Nov 17, 2026
@bhabalan bhabalan changed the title chore(release): migrate npm publishing to OIDC chore(release): use Yarn trusted publishing with OIDC Nov 17, 2026
@bhabalan bhabalan added the validated Indicates that the PR is ready for actions label Nov 17, 2026
@bhabalan
bhabalan marked this pull request as ready for review November 19, 2026 04:48
@bhabalan
bhabalan requested a review from a team as a code owner November 19, 2026 04:48
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T04:51:36.518016Z e7d5204 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

validated Indicates that the PR is ready for actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants