Skip to content

fix(release): declare the repository for npm provenance - #31

Merged
rendis merged 1 commit into
mainfrom
issue/wonderful-fermi-8r8eid
Oct 5, 2026
Merged

rendis merged 1 commit into
mainfrom
issue/wonderful-fermi-8r8eid

Conversation

@rendis

@rendis rendis commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

The first automated publish of the Studio 0.2.0 packages (run #1) was rejected by npm:

npm error 422 Unprocessable Entity - PUT https://registry.npmjs.org/@rendis%2fstatepro-studio-react
Error verifying sigstore provenance bundle: Failed to validate repository information:
package.json: "repository.url" is "", expected to match "https://github.com/rendis/statepro" from provenance

Trusted Publishing itself worked: npm accepted the workflow identity and signed the provenance. Verification then failed because neither package declares repository. Nothing was published; npm still shows 0.1.2 and 0.1.1.

Changes

  • Both Studio package.json files now declare repository:
    • url: https://github.com/rendis/statepro
    • directory: the package's path in the repo
  • Before packing, the release workflow sets the same field on its runner copy, using GITHUB_REPOSITORY. This is needed because the npm job publishes what is tagged, and the v3.4.0 tag predates the field. The tag can still be published without cutting a new release.

Validation

  • I reproduced the tag state locally (both package.json files without repository) and ran the workflow's pack loop with pnpm 10.11.0:
    • Both tarballs come out with the correct repository.url and directory.
    • The Web Component depends on @rendis/statepro-studio-react 0.2.0.
    • npm publish --dry-run accepts both tarballs.
  • actionlint reports no issues, and pnpm install --frozen-lockfile leaves the lockfile unchanged.

After merge, the push to main reruns the release workflow. It plans target=npm again and publishes both 0.2.0 packages from v3.4.0.

The first automated publish of the Studio 0.2.0 packages was rejected by
npm with E422: provenance verification requires package.json repository.url
to match the GitHub repository, and neither package declared it. Trusted
Publishing itself succeeded; nothing was published.

Declare the repository in both packages, and have the release workflow set
it on the runner copy before packing so versions tagged before this change
(v3.4.0) can still be published.
@rendis
rendis merged commit a7fff58 into main Oct 5, 2026
6 checks passed
@rendis
rendis deleted the issue/wonderful-fermi-8r8eid branch October 5, 2026 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant