ci: add 2nd-gen-only beta publish scope to publish workflow#6406
ci: add 2nd-gen-only beta publish scope to publish workflow#6406Rajdeepc wants to merge 3 commits into
Conversation
Add a manual `scope` input (all | 2nd-gen) to the Publish Packages workflow so a private beta of the 2nd-gen packages can be cut on demand without releasing 1st-gen. When scope is `2nd-gen`, only @spectrum-web-components/core (OIDC trusted publishing) and @adobe/spectrum-wc (npm token) are packed and published under the chosen pre-release dist-tag; 1st-gen steps and React wrappers are skipped, and the `latest` tag is rejected for this scope. The default `all` scope and the automatic push-to-main `next` release are unchanged. Co-authored-by: Cursor <cursoragent@cursor.com>
Allow the 2nd-gen-only scope to run with npm publish --dry-run so the build, version, and pack steps can be validated from a feature branch without writing to the npm registry. Co-authored-by: Cursor <cursoragent@cursor.com>
The check-changesets step runs under `bash -e`, so the package-detection grep aborted the job whenever a changeset referenced only @spectrum-web-components/core (grep -v matches nothing and exits 1). Add `|| true` so core-only and @adobe-only changesets are handled. Co-authored-by: Cursor <cursoragent@cursor.com>
|
📚 Branch Preview Links🔍 First Generation Visual Regression Test ResultsWhen a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:
Deployed to Azure Blob Storage: If the changes are expected, update the |
Description
Adds a manual, scoped pre-release path to the Publish Packages workflow so a private beta of the 2nd-gen packages can be cut on demand without releasing 1st-gen.
workflow_dispatchinputscope(all|2nd-gen). Defaults toall.workflow_dispatchinputdry_run(boolean, defaultfalse) for the 2nd-gen scope; usesnpm publish --dry-runso the build/version/pack can be validated without writing to npm.scope == 2nd-gen:@spectrum-web-components/coreand@adobe/spectrum-wcare packed (yarn pack, which resolves theworkspace:protocol) and published with the chosen dist-tag.corecontinues to use OIDC trusted publishing and@adobe/spectrum-wcthe npm token, matchingchangeset publishbehavior — so this must remain inpublish.yml(same workflow file +npm-publishenvironment) for OIDC to keep matching.build:confirm, React wrappers) are skipped, and 1st-gen is never published even when 1st-gen changesets are present.latesttag is rejected for this scope.bash -ebug incheck-changesets: the package-detectiongrepaborted the job whenever a changeset referenced only@spectrum-web-components/core(grep -vmatches nothing and exits 1). Added|| true.This is backward compatible: the default
allscope and the automatic push-to-mainnextrelease are unchanged;scopeis only evaluated for manual runs.Motivation and context
We are running a private (unannounced) beta of the 2nd-gen components through mid-July. Releases need to go out under the
betadist-tag for the 2nd-gen packages only, while 1st-gen continues its normalnext/latestcadence frommain. The existing workflow publishes every changeset-bumped package under a single tag, so it cannot scope a beta to 2nd-gen.Related issue(s)
Author's checklist
Manual review test cases
Dry run from the branch publishes nothing but validates packing
gh workflow run publish.yml --ref rajdeepchandra/ci-2nd-gen-beta-publish -f tag=beta -f scope=2nd-gen -f dry_run=truecheck-changesetspasses and the "Publish 2nd-gen packages only" step runsnpm publish --dry-runforcore+@adobe/spectrum-wc.Real 2nd-gen beta publishes only core + swc
beta, scope2nd-gen.@spectrum-web-components/core@…-beta-…and@adobe/spectrum-wc@…-beta-…on npm under thebetatag.Accessibility testing checklist
Made with Cursor