Skip to content

ci(publish): single-trigger 1st-gen next and gated 2nd-gen beta from main#6468

Draft
Rajdeepc wants to merge 1 commit into
mainfrom
rajdeepc/ci-single-trigger-main-2nd-gen-beta
Draft

ci(publish): single-trigger 1st-gen next and gated 2nd-gen beta from main#6468
Rajdeepc wants to merge 1 commit into
mainfrom
rajdeepc/ci-single-trigger-main-2nd-gen-beta

Conversation

@Rajdeepc

@Rajdeepc Rajdeepc commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Description

Adds a single manual publish trigger from main that can ship 1st-gen and 2nd-gen in one workflow run without maintaining a separate release branch for day-to-day betas.

What changes

.github/workflows/publish.yml

  • New workflow_dispatch inputs:
    • tag — 1st-gen dist-tag (next, latest, etc.); 2nd-gen always publishes under beta
    • beta_2nd_gen (default true) — also cut a 2nd-gen beta when eligible
    • dry_run — pack + npm publish --dry-run for 2nd-gen (no registry writes)
  • check-changesets now outputs has_2nd_gen_changesets when any pending changeset mentions @spectrum-web-components/core or @adobe/spectrum-wc
  • 1st-gen path: changeset version --snapshot → mark core/swc private: truechangeset publish --tag <tag> (1st-gen only)
  • 2nd-gen path (gated): runs only on manual dispatch when beta_2nd_gen is enabled, tag is not latest, and has_2nd_gen_changesets is true
    • scripts/main-2nd-gen-beta-release.js retitles snapshot changelog entries to 2.0.0-beta.N, sets versions, refreshes 2nd-gen version.ts (leaves 1st-gen/tools/base/src/version.ts on main)
    • Rebuild → yarn pack + npm publish --tag beta
  • PR snapshot-test runs are unchanged (2nd-gen is not excluded)
  • Publish summary shows 1st-gen and 2nd-gen versions with their respective tags

scripts/main-2nd-gen-beta-release.js

  • Bridges snapshot versioning (which writes 2nd-gen changelog under 0.x-next.*) to the 2.0.0-beta.N line used on npm
  • Auto-increments beta.N from published @adobe/spectrum-wc versions

What this does not change

Motivation and context

Team agreed to run 2.0.0-beta.x through the rest of the year while 1st-gen continues on next. Operating two release surfaces (main for 1st-gen, gen2-beta for 2nd-gen) creates duplicate release work.

This PR lets a release manager trigger one publish from main and get:

  • 1st-gen packages on next (or chosen tag)
  • 2nd-gen @spectrum-web-components/core + @adobe/spectrum-wc on beta at 2.0.0-beta.N

only when there are actual 2nd-gen changesets — no empty beta cuts.

Related prior work:

Related issue(s)

  • Jira: <ADD TICKET NUMBER — do not link, per Adobe guidance>

Screenshots (if appropriate)

N/A — CI / release workflow only.

Author's checklist

  • I have read the CONTRIBUTING and PULL_REQUESTS documents.
  • I have reviewed at the Accessibility Practices for this feature, see: Aria Practices
  • I have added automated tests to cover my changes. (N/A — release workflow only.)
  • I have included a well-written changeset if my change needs to be published. (N/A — no package publish from this PR.)
  • I have included updated documentation if my change required it. (Follow-up: operator runbook if team wants it in CONTRIBUTOR-DOCS.)

Reviewer's checklist

  • Includes a Github Issue with appropriate flag or Jira ticket number without a link
  • Includes thoughtfully written changeset if changes suggested include patch, minor, or major features
  • Automated tests cover all use cases and follow best practices for writing
  • Validated on all supported browsers
  • All VRTs are approved before the author can update Golden Hash

Manual review test cases

  • 1st-gen + 2nd-gen release (dry run)

    1. Trigger Publish Packages on main with tag=next, beta_2nd_gen=true, dry_run=true
    2. Confirm workflow logs: has_2nd_gen_changesets=true, run_2nd_gen_beta=true
    3. Confirm 1st-gen packages publish under next; 2nd-gen shows npm publish --dry-run for @2.0.0-beta.N under beta
    4. Confirm 2nd-gen CHANGELOG.md entries are retitled to ## 2.0.0-beta.N (not 0.x-next.*)
  • 1st-gen only — beta step skipped

    1. On a branch/commit with only 1st-gen changesets (no core / @adobe/spectrum-wc in .changeset/*.md)
    2. Trigger with beta_2nd_gen=true
    3. Confirm has_2nd_gen_changesets=false, run_2nd_gen_beta=false
    4. Confirm Prepare 2nd-gen beta release and Publish 2nd-gen beta steps are skipped
    5. Confirm core / swc versions stay at committed values (not bumped to beta)
  • PR snapshot-test unchanged

    1. Open a PR with snapshot-release label
    2. Confirm exclude_2nd_gen=false and 2nd-gen is included in snapshot publish (smoke-test path)
  • latest prod run

    1. Trigger with tag=latest
    2. Confirm run_2nd_gen_beta=false regardless of beta_2nd_gen
    3. Confirm commit step restores 2nd-gen manifests before pushing version bumps

Device review

N/A — no UI changes.

  • Did it pass in Desktop? (N/A)
  • Did it pass in (emulated) Mobile? (N/A)
  • Did it pass in (emulated) iPad? (N/A)

Accessibility testing checklist

N/A — this PR changes only the GitHub Actions publish workflow and a release prep script. No component DOM, focus, keyboard, or screen-reader surface is affected.

  • Keyboard (required — document steps below)
    N/A — no interactive UI. Confirm no Storybook or docs regressions in unrelated areas during manual workflow testing.

  • Screen reader (required — document steps below)
    N/A — no interactive UI or ARIA surface changed by this PR.

Local verification (author)

Dry runs on rajdeepc/ci-single-trigger-main-2nd-gen-beta:

Scenario has_2nd_gen run_2nd_gen_beta Outcome
All pending changesets (1st + 2nd gen) true true 1st-gen next snapshot + 2nd-gen 2.0.0-beta.N changelog + dry-run publish
Only 1st-gen changesets (menu/picker/action-menu) false false 1st-gen bumps; core/swc unchanged; beta steps skipped

Acceptance criteria

  • Given a manual publish from main with pending 1st-gen and 2nd-gen changesets, when tag=next and beta_2nd_gen=true, then 1st-gen publishes under next and 2nd-gen publishes under beta at 2.0.0-beta.N with changelog entries for consumed 2nd-gen changesets.
  • Given only 1st-gen changesets on main, when beta_2nd_gen=true, then no 2nd-gen beta is cut and prepare/publish 2nd-gen steps are skipped.
  • Given tag=latest, when the workflow runs, then no 2nd-gen beta is cut regardless of changesets.
  • Given a PR with snapshot-release, when publish runs, then 2nd-gen is not excluded (existing smoke-test behavior preserved).

…main

Let one manual publish from main ship 1st-gen under next while 2nd-gen
releases as 2.0.0-beta.N only when pending changesets mention core or
@adobe/spectrum-wc. Snapshot versioning still consumes changesets for both
generations; main-2nd-gen-beta-release retitles 2nd-gen changelogs to beta.N
before pack/publish so 2nd-gen never rides the next train.

Co-authored-by: Cursor <cursoragent@cursor.com>
@changeset-bot

changeset-bot Bot commented Jul 6, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: c303abe

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@Rajdeepc Rajdeepc changed the title ci(publish): single-trigger 1st-gen next and gated 2nd-gen beta from … ci(publish): single-trigger 1st-gen next and gated 2nd-gen beta from main Jul 6, 2026
@Rajdeepc Rajdeepc self-assigned this Jul 6, 2026
@Rajdeepc Rajdeepc added Component:Tooling Issue or PR dealing with scripts, workflows, automation, etc. Component prefix is for Jira 2nd gen These issues or PRs map to our 2nd generation work to modernizing infrastructure. release-to-npm 1st-gen labels Jul 6, 2026
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

📚 Branch Preview Links

🔍 First Generation Visual Regression Test Results

When 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: pr-6468

If the changes are expected, update the current_golden_images_cache hash in the circleci config to accept the new images. Instructions are included in that file.
If the changes are unexpected, you can investigate the cause of the differences and update the code accordingly.

@coveralls

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 28791436109

Coverage decreased (-0.003%) to 96.254%

Details

  • Coverage decreased (-0.003%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 39169
Covered Lines: 37903
Line Coverage: 96.77%
Relevant Branches: 6457
Covered Branches: 6014
Branch Coverage: 93.14%
Branches in Coverage %: Yes
Coverage Strength: 461.97 hits per line

💛 - Coveralls

Rajdeepc

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1st-gen 2nd gen These issues or PRs map to our 2nd generation work to modernizing infrastructure. Component:Tooling Issue or PR dealing with scripts, workflows, automation, etc. Component prefix is for Jira release-to-npm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants