feat(ci): migrate to npm trusted publishing with OIDC #671
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Migrates the release workflow from deprecated long-lived NPM tokens to npm's new Trusted Publishing feature using OpenID Connect (OIDC). This resolves the authentication failures in recent releases and eliminates the need to manage NPM_TOKEN secrets.
Problem
Recent releases have been failing with authentication errors:
This affects multiple releases including:
Result: No packages were published to npm, and no GitHub releases were created.
Solution
NPM now recommends Trusted Publishing with OIDC over long-lived tokens. This approach:
✅ More Secure: Short-lived, workflow-specific credentials that can't be extracted
✅ Zero Maintenance: No token rotation or secret management needed
✅ Industry Standard: Recommended by OpenSSF, used by PyPI, RubyGems, etc.
✅ Automatic Provenance: Built-in supply chain security
Changes
NPM_TOKENenvironment variable (no longer needed)id-token: writepermission already in place (required for OIDC)Required Setup (One-Time Configuration)
Packages to Configure Now (8 packages)
Configure these packages that are already published to npm:
@adobe/changeset-linter@adobe/optimized-diff@adobe/spectrum-component-api-schemas@adobe/spectrum-component-diff-generator@adobe/spectrum-design-data-mcp@adobe/spectrum-diff-core@adobe/spectrum-tokens@adobe/token-diff-generatorConfigure Later (1 package)
This package was versioned in PR #670 but never published due to the auth failure:
@adobe/design-system-registry(v1.1.0 queued) - Configure trusted publisher after first successful publishConfiguration for Each Package
For each package above:
adobespectrum-design-datarelease.ymlQuick Setup Helper
Run this script to open all 8 package access pages at once:
Optional: Enhanced Security
After configuring trusted publishers, you can further secure each package:
Verification
After setup, the next merge to
mainwill trigger a release using OIDC authentication. You can verify success by:Testing
This can be tested after trusted publishers are configured by:
References
Related