Repository: OpenZeppelin/openzeppelin-adapters
Purpose: Release credentials, provenance configuration, and CI setup for adapter package publishing
The adapter repository publishes packages under the @openzeppelin/adapter-* namespace. Release automation requires:
- npm trusted publishing (OIDC) for
@openzeppelinscope releases - GitHub App or PAT for release PR creation and workflow triggers
- Provenance attestation for stable published packages
- Access to create and configure the
OpenZeppelin/openzeppelin-adaptersrepository - npm publish permissions for
@openzeppelin/adapter-*packages - GitHub Actions variables/secrets for the GitHub App (optional; no npm secrets required)
Cross-checked with npm trusted publishers — Step 2.
- Trusted publishing (publish only): On npmjs.com → package Settings → Trusted publishing, set workflow filename to
publish.yml(stablepushtomainand RCworkflow_dispatchshare this file; npm allows one trusted publisher filename per package). - Workflow requirements (both release workflows):
permissions.id-token: writeat workflow levelactions/setup-node@v6immediately before publish withnode-version: '24',registry-url: 'https://registry.npmjs.org',package-manager-cache: false- No
NPM_TOKENon publish (OIDC only). Installs use the public registry and workspace packages — no npm secrets required. - npm CLI ≥ 11.5.1 (bundled with Node 24) and Node ≥ 22.14.0
repository.urlin each published package must matchhttps://github.com/OpenZeppelin/openzeppelin-adapters.git(already set on@openzeppelin/adapter-*).- Provenance: Generated automatically when publishing via trusted publishing from a public repo + public package;
NPM_CONFIG_PROVENANCE: truein the workflow is optional redundancy. - After verification: Consider package Settings → Publishing access → “Require 2FA and disallow tokens” for maximum security (trusted publishers keep working).
- GITHUB_TOKEN (provided by Actions): Used for checkout and basic API access
- GH_APP_ID + GH_APP_PRIVATE_KEY (repository variables + secret): Optional but recommended for
changesets/actionso release PRs and commits use a GitHub App identity (mirrors openzeppelin-ui / ui-builder patterns) - If the GitHub App is not configured, workflows fall back to
github.token(subject to defaultGITHUB_TOKENpermissions)
Stable releases MUST produce verifiable provenance for published packages.
- OIDC / trusted publishing:
publish.ymlrequestsid-token: writeand authenticates toregistry.npmjs.orgviaactions/setup-node(trusted publisher), so npm can attest the publishing workflow. - Environment: Publish steps set
NPM_CONFIG_PROVENANCE: truesopnpm changeset publishrequests npm provenance for eligible packages. - Verification: Consumers can inspect
npm view <package> provenanceafter publish.
RC publishes use the same provenance flag where the registry accepts it; treat RC as staging validation, stable as the contractual provenance target.
- Merges to
mainthat include new changeset files do not immediately bumppackage.jsonin that same merge unless you run the version flow locally; typically changesets/action opens or updates a Version packages PR. - A maintainer reviews that PR; merging it applies synchronized version bumps across the linked adapter set (see
.changeset/config.json). - The Release workflow then publishes stable packages to the default npm dist-tag when the merge commit is processed.
- Run Release manually (
workflow_dispatchonpublish.yml) when you want the linked public adapters on the npmrcdist-tag (after the intended commits are onmain). - Use this for staging validation before promoting stable releases.
- No downstream sync commits; consumers resolve versions from npm metadata.
- Follow the Changesets release PR merge;
publish.ymlrunspnpm changeset publish --no-git-checkswith provenance enabled. ui-buildercontinues to own application staging/production deployment; it refreshesapps/builder/src/export/versions.tsviapnpm update-export-versions(adapter lines sourced from published npm metadata, orLOCAL_ADAPTERS_PATHfor local overrides).
- prepare action: Checkout, pnpm 11+, Node 24,
pnpm install-deps(no npm secrets); release usespackage-manager-cache: false;Configure npm trusted publishingruns only before publish - ci.yml: Lint, typecheck, test, build
- publish.yml: Changesets release PR + stable publish
- publish.yml (RC path):
workflow_dispatchruns the same SLSA + attestations path with Changesets prerelease (pre enter rc) andchangeset publishto thercdist-tag
The following MUST remain true:
packages/contains onlyadapter-*workspaces (adapter-evm,adapter-evm-core,adapter-midnight,adapter-polkadot,adapter-solana,adapter-stellar). There MUST NOT be legacy@openzeppelin/ui-builder-adapter-*wrapper packages or duplicate adapter trees.pnpm-workspace.yamllists onlypackages/*(no stray paths).- publish.yml MUST NOT reference legacy adapter package names or paths outside this monorepo.
- RUNBOOK.md – Release operations, rollout gate, troubleshooting
- .changeset/README.md – Maintainer flow for Changesets and RC
- Operational contracts: ui-builder
specs/012-adapter-monorepo-extraction/contracts/release-and-consumer-contracts.md