A publishing configuration created several days ahead of a release can now expire before its first use. Following the October 2 announcement, npm gives new trusted publishing relationships 48 hours to become validated.
This concerns configurations that have never published successfully. It does not require teams to publish a package every two days.
The rule that matters
A successful first publication validates the configuration and removes the expiry requirement. An expired relationship must be recreated. npm also rejects trusted publishing tokens from GitHub Actions issue_comment events, alongside pull_request_target. The GitHub announcement describes these changes.
Trusted publishing uses OIDC to link the registry to a pipeline identity rather than a permanent publishing secret. The npm documentation explains how that relationship is configured.
Prepare the release before opening the window
Our recommendation is to finish release checks before creating the trust relationship. Build the package, complete tests and identify the publication trigger first. Creating the configuration on Friday and waiting for approval on Tuesday is now a poor sequence.
Do not publish a meaningless version solely to beat the deadline. Create the relationship close to a real release. If the release is postponed, recreate it when the publication is ready.
Make someone responsible for checking the repository name, workflow name and authorised environment. A single incorrect character can make a configuration unusable even when compilation succeeds.
Review identities and triggers separately
A comment-triggered publishing workflow deserves a specific review. Establish why it had publication rights: convenience, inherited automation or a real approval requirement. We recommend an explicit release trigger restricted to authorised people.
Do not swap one event for another without checking branch protections and workflow inputs. The intended result is still a publication whose origin and approval are understandable.
For multiple packages, keep an inventory of which relationship publishes which package. A configuration valid for one package does not establish that all packages share its state or permissions.
Make publication failures visible
A green build is not proof of successful publication. The job that uploads the package should fail clearly when trust validation fails. Suppressing that error obscures the difference between a built version and an available version.
Record the built artefact, published version and registry availability separately in release procedures. That makes it easier to retry the affected step without rebuilding or renumbering the entire project.
Check before the next release
Inventory configurations that have never been used and events capable of publishing. Then verify the relationship intended for the next package in the registry. Teams with already validated relationships do not need to recreate them merely because this announcement exists.
This complements our coverage of CI cache permissions: each automation should have a clear scope, from reused files to the package that ultimately reaches users.
Cover visual: an illustration generated for this article, not an official service screenshot.




Join the discussion
Comments
Loading comments…