Repository navigation
build(Felt): migrate promote to Nx and remove Lerna - #12708
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
|
Your changes have been released in: a617036 @rh-felt/react-charts@0.0.1-prerelease.8, @rh-felt/react-code-editor@0.0.1-prerelease.8, @rh-felt/react-core@0.0.1-prerelease.8, @rh-felt/react-docs@0.0.1-prerelease.6, @rh-felt/react-drag-drop@0.0.1-prerelease.8, @rh-felt/react-icons@0.0.1-prerelease.6, @rh-felt/react-styles@0.0.1-prerelease.6, @rh-felt/react-table@0.0.1-prerelease.8, @rh-felt/react-templates@0.0.1-prerelease.8, @rh-felt/react-tokens@0.0.1-prerelease.6 Thanks for your contribution! 🎉 |
What: Migrates the Promote workflow from Lerna to Nx, prepares stable graduation, and removes Lerna entirely, completing the release migration for FELT-144.
Implementation
--ci-promotetoscripts/nx-release.mjs: starts the next prerelease cycle for every public package using Nx's nativepreminorspecifier with theprereleasepreid — Lerna-compatible0.0.1-prerelease.7→0.1.0-prerelease.0. It commits, tags, and pushes, but never packs or publishes.adjustSemverBumpsForZeroMajorVersion: false) sopreminorfollows raw semver, matching Lerna. The prerelease counter flow is unaffected.--ci-graduate --version=X.Y.Z: applies one explicitly chosen stable version to every public package, commits and pushes, and packs a release bundle recorded with npm'slatestdist-tag. The version is always chosen by the promoter; prerelease suffixes are never auto-stripped.promote.ymlwith the same least-privilege split as the release workflow: a prepare job (contents: write, no OIDC token) and a publish job (id-token: write,contents: read) that publishes the prepared bundle through existing OIDC trusted publishing.--publish-onlyreads the dist-tag from the bundle, so prereleases and graduations share one publishing code path.publish-only-run-id, mirroring the release workflow, including stale-release rejection.lerna.json, drop the dependency (removing its bundled Nx 22 and ~3,200 lockfile lines), rename the root workspace to@rh-felt/react-root, and update contribution docs.How to promote
Promote is manual (
workflow_dispatch) and replaces Lerna's process of hand-editingpromote.shto switch between stable publication and cycle preparation.mode: cycle(the default). Every public package bumps to the next minor's first prerelease (0.1.0-prerelease.0); the release commit and tags are pushed. Nothing is published — subsequent merges publish the cycle's versions through the normal release workflow.mode: graduateandversion: X.Y.Z(for example0.1.0). All public packages are versioned, tagged, and published under npm'slatestdist-tag through OIDC trusted publishing, with a 30-day recovery artifact retained. Afterwards, run Promote withmode: cycleto start the next prerelease cycle.publish-only-run-idset to the failed run's ID. It republishes the exact original bundle after the recorded source commit and refuses releases older than the latest recorded release.modedefaults tocycle, and publishing requires deliberately selectinggraduateand entering a version.Before the first graduation: npm trusted publishers must additionally authorize
promote.ymlfor each public package (organizationpatternfly, repositorypatternfly-react, workflowpromote.yml), configured close to the release date — npm removes new trusted-publisher entries that do not publish within two days. The existingrelease.ymlentries do not cover this workflow.Testing
latestdist-tag packing, dry-run behavior for both modes, publish dist-tag routing, and recovery validation.0.1.0-prerelease.0; graduate resolves all ten to the chosen0.1.0; neither writes, commits, tags, pushes, or publishes.The graduate path's first real OIDC publication can only be verified at the first actual stable cut; it is prepared and mock/dry-run verified here.
Additional issues: Configure the
promote.ymlnpm trusted-publisher entries before the first stable release. The optionalpatternfly-versiondependency-update step remains commented out, as under Lerna.