ci: adjust 3.x branch references#16358
Merged
Merged
Conversation
This branch will become the long-lived 3.x maintenance branch once v4 work begins on main. Lock the CI/release tooling to 3.x so stable releases ship from here while main publishes v4 betas. - tools/releaser: target 3.x for GitHub draft releases - workflows/main: trigger on 3.x push; drop no-op canary job - workflows/publish-prerelease: drop nightly cron; only on-demand internal builds - workflows/post-release-templates: open template sync PRs against 3.x - create-payload-app: default templates, examples, and skill downloads to 3.x
Sweep all documentation, README, template, example, and test source references from the main branch to 3.x so this branch is internally self-consistent once v4 work begins on main. Covers: - docs/**/*.mdx GitHub tree/blob links - package and template README links - source-level links in templates/, examples/, and test/live-preview - raw.githubusercontent.com asset URLs in templates/examples - tools/scripts/src/generate-template-variations.ts templateRepoUrlBase - .github issue/PR templates and reproduction guides - tools/claude-plugin skill references Workflow-filename references to main.yml (shields.io badges) are unrelated to branches and were intentionally left untouched.
GitHub serves PR/issue/reproduction templates from the default branch regardless of which branch is checked out, so retargeting the links on 3.x has no effect at render time.
Same reasoning as prior revert: GitHub serves issue templates from the default branch, so retargeting on 3.x has no render-time effect.
GitHub runs release:, schedule:, issues:, and pull_request_target: events only from the default branch. These workflows would never fire on 3.x, so delete them along with their exclusively-consumed custom actions to avoid confusion about what actually runs here. Removed workflows: - activity-notifications, audit-dependencies (+ .sh), dispatch-event, label-on-change, lock-issues, post-release, post-release-templates (+ wait-until-package-version.sh), pr-title, stale, triage Removed custom actions (now unused): - actions/activity, actions/release-commenter, actions/triage Dropped .github/pnpm-workspace.yaml + pnpm-lock.yaml since the deleted actions were the only workspace members. Retained: main.yml, publish-prerelease.yml, actions/setup, actions/start-services, and the e2e/int matrix configs.
GitHub serves ISSUE_TEMPLATE/, PULL_REQUEST_TEMPLATE.md, and related assets from the default branch regardless of which branch is checked out, so these files are dead weight on 3.x. Also removes comments/invalid-reproduction.md, which was consumed only by the triage action removed in the prior commit.
Two misses from the earlier sweep:
- dependabot.yml: only read from the default branch, so dead on 3.x
(same category as issue templates removed earlier)
- templates/{website,with-vercel-website,ecommerce}/src/endpoints/seed/
index.ts: raw.githubusercontent.com /refs/heads/main/ URLs for seed
images. The prior regex only covered the /main/ short form.
Contributor
📦 esbuild Bundle Analysis for payloadThis analysis was generated by esbuild-bundle-analyzer. 🤖
Largest pathsThese visualization shows top 20 largest paths in the bundle.Meta file: packages/next/meta_index.json, Out file: esbuild/index.js
Meta file: packages/payload/meta_index.json, Out file: esbuild/index.js
Meta file: packages/payload/meta_shared.json, Out file: esbuild/exports/shared.js
Meta file: packages/richtext-lexical/meta_client.json, Out file: esbuild/exports/client_optimized/index.js
Meta file: packages/ui/meta_client.json, Out file: esbuild/exports/client_optimized/index.js
Meta file: packages/ui/meta_shared.json, Out file: esbuild/exports/shared_optimized/index.js
DetailsNext to the size is how much the size has increased or decreased compared with the base branch of this PR.
|
Two main-branch refs the earlier sweep didn't catch: - templates/website/README.md: the one-click-deploy link added in 5a39afc landed on origin/3.x and was picked up by the rebase. - templates/with-vercel-website/README.md: the Vercel deploy-button URL is hand-maintained (the generator sets skipReadme: true for this variation) and uses URL-encoded slashes, which the prior regex did not match.
Output of `pnpm script:gen-templates` against current workspace versions (3.84.0). Updates template package.json deps, regenerates importMap.js files, and refreshes the timestamped initial migrations for with-postgres, with-vercel-postgres, and with-vercel-website.
DanRibbens
approved these changes
Apr 23, 2026
DanRibbens
left a comment
Contributor
There was a problem hiding this comment.
This looks good for the templates and docs to continue to work.
The sequencing for the branch change happening before this means it is safe to remove the files removed.
I spot checked links, nothing is broken.
denolfe
added a commit
that referenced
this pull request
May 26, 2026
# Overview Restores release notifications (PR/issue comments, website dispatch, Discord announcement) for Payload v3.x releases. ## Key Changes - **Port `post-release` workflow and `release-commenter` action to `3.x`** - Adds `.github/workflows/post-release.yml` and `.github/actions/release-commenter/` from `main`. - GitHub Actions resolves `release` event workflows from the release's `target_commitish` branch, not the repo default. Since v3.84.1, releases set `target_commitish: 3.x`, where neither file existed, so no workflow runs were queued. - **Differences vs. the version previously on `3.x` (removed in #16358)** - `release-commenter` action: identical. - `post-release.yml`: adds the `dispatch-to-website` job (sends `repository_dispatch` to `payloadcms/website`) and pins the Discord action to a SHA. Reviewers should confirm `dispatch-to-website` is desired for 3.x releases; if the website only expects events from `main`/v4, that job should be dropped before merging. ## Design Decisions Chose to reinstate original workflow. Drift risk: future edits to `post-release.yml` on `main` must be mirrored to `3.x`. ## Overall Flow ```mermaid sequenceDiagram participant Releaser as tools/releaser participant GH as GitHub participant WF as post-release.yml (3.x) participant Site as payloadcms/website participant Discord Releaser->>GH: Publish release (target_commitish=3.x) GH->>WF: Trigger release:published from 3.x branch WF->>GH: Comment on linked PRs/issues (release-commenter) WF->>Site: repository_dispatch payload-release-event WF->>Discord: Post to releases + general channels ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Adapt the 3.x branch for its new role as the v3 maintenance line now that v4 development has begun on
main. Retargets release tooling, CI, templates, and documentation links frommainto3.x, and removes workflows and GitHub surfaces that only fire from the default branch.Key Changes
Release tooling retargeted to 3.x
tools/releasercreates GitHub draft releases against3.x.create-payload-appdefaults its template, example, and skill-download branch refs to3.x..github/workflows/main.ymltriggers on pushes to3.x; the no-oppublish-canaryjob was dropped..github/workflows/publish-prerelease.ymldrops the nightly cron and thecanaryrelease type; on-demandinternal/internal-debugbuilds remain.Default-branch-only workflows and surfaces removed
schedule:,release:,issues:, andpull_request_target:events (activity-notifications, audit-dependencies, dispatch-event, label-on-change, lock-issues, post-release, post-release-templates, pr-title, stale, triage), along with their exclusively-consumed custom actions (activity,release-commenter,triage) and the orphaned.githubpnpm workspace..github/ISSUE_TEMPLATE/,PULL_REQUEST_TEMPLATE.md,comments/invalid-reproduction.md, anddependabot.yml— GitHub serves all of these only from the default branch.Docs, templates, and source links retargeted
github.com/payloadcms/payload/(tree|blob)/main/…andraw.githubusercontent.com/payloadcms/payload/(refs/heads/)?main/…references across docs, READMEs, templates, examples, and test source, rewritten to3.x.%2Fpayload%2Ftree%2Fmain%2F…forms (e.g. Vercel deploy-button links) and the one-click-deploy link added post-rebase in 5a39afc.shields.ioworkflow-filename badges (referencemain.yml, not a branch), cross-repopayloadcms/website/refs/heads/main/…links, and allmainworkflow files onmainitself (this PR is scoped to 3.x).Template variations regenerated
pnpm script:gen-templatesoutput against workspace 3.84.0: bumpspayload,@payloadcms/*deps in templatepackage.jsonfiles, refreshesimportMap.jsfor admin-rendered templates, and re-timestamps the initial migrations forwith-postgres,with-vercel-postgres, andwith-vercel-website.Design Decisions
3.xhere,mainon v4). Simpler than branch-aware logic, trivially reviewable, and the Phase 2 swap (v4 →latest) stays a small diff.dist-bundle noise (~88k of the line-deletion count is pre-built action bundles).main. Release events always run from the default branch regardless of where the release was cut, somain'spost-release.ymlcontinues announcing both v3 patches (from 3.x) and v4 betas. No 3.x-side copy is needed.latest;mainwill publish v4 betas tobeta. Phase 2 renames the 3.x package topayload-3, freeinglatestfor v4 — so no per-major dist-tag scheme is needed.Overall Flow
npm channels during Phase 1:
3.xlatestinternal,internal-debugmainbetacanaryinternal,internal-debugRelease events (draft-release publish) always dispatch from the default branch — which is
main— regardless of where the release was cut. A v3 patch published from3.xtherefore flows throughmain's post-release workflows:sequenceDiagram actor Dev as Maintainer participant ThreeX as 3.x branch tooling participant NPM as npm participant GH as GitHub participant MainWF as main's post-release.yml participant Discord Dev->>ThreeX: pnpm release (v3.x.y) ThreeX->>NPM: publish at latest ThreeX->>GH: create draft release (target 3.x) Dev->>GH: publish release GH->>MainWF: release:published (fires from default branch) MainWF->>MainWF: release-commenter filters tag major (v3) MainWF->>GH: comment on v3 PRs/issues MainWF->>Discord: announce releaseThe same workflow path handles v4 releases from
main, with the release-commenter filtering tov4tags.