Skip to content

Commit ecb2be2

Browse files
committed
Update splitting and release workflows
1 parent b16cebf commit ecb2be2

32 files changed

Lines changed: 670 additions & 23 deletions

.cursor/rules/release-workflow.mdc

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,20 @@ Use these steps whenever a request involves releasing, versioning, publishing, o
2525
- `demo-bump.yml` runs after release success and calls `scripts/bump-demo.sh`.
2626
- This is currently a placeholder handoff for downstream integration.
2727
6. Mirror flow:
28-
- Push a `v*` tag to trigger `split-webentor-setup.yml` and `split-webentor-starter.yml`.
28+
- Push a namespaced tag to trigger the mirror workflow you intend:
29+
- `core-v*` -> `split-webentor-core.yml`
30+
- `setup-v*` -> `split-webentor-setup.yml`
31+
- `starter-v*` -> `split-webentor-starter.yml`
2932
- Mirrors use `git subtree split` to publish package contents to standalone repos.
33+
- Mirror scripts normalize namespaced tags to `vX.Y.Z` in target mirror repositories.
3034
7. Validation:
3135
- Verify published versions for `webentor-core` and `webentor-configs` on npm.
32-
- Verify mirror repos received updates for `webentor-setup` and `webentor-starter`.
36+
- Verify mirror repos received updates for `webentor-core`, `webentor-setup`, and `webentor-starter`.
37+
- Update `docs/src/compatibility-matrix.md` with the tested-together release version set.
3338

3439
## Guardrails
3540

3641
- Only `webentor-core` and `webentor-configs` are npm-published via Changesets.
37-
- `webentor-setup` and `webentor-starter` are delivered via split-mirror workflows.
42+
- `webentor-core`, `webentor-setup`, and `webentor-starter` are delivered via split-mirror workflows for standalone repositories.
3843
- Changesets baseline config is `.changeset/config.json` (`baseBranch: main`, `access: public`).
3944
- Required GitHub secrets for demo bump workflow: `WEBENTOR_DEMO_REPO`, `WEBENTOR_DEMO_TOKEN`.

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ jobs:
9090
- uses: actions/checkout@v4
9191
- uses: shivammathur/setup-php@v2
9292
with:
93-
php-version: '8.2'
93+
php-version: '8.3'
9494
- uses: actions/setup-node@v4
9595
with:
9696
node-version: '20'
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: split-webentor-core
2+
3+
on:
4+
push:
5+
tags:
6+
- 'core-v*'
7+
workflow_dispatch:
8+
inputs:
9+
tag:
10+
description: 'Tag to mirror (defaults to current ref tag)'
11+
required: false
12+
13+
jobs:
14+
split:
15+
runs-on: ubuntu-latest
16+
permissions:
17+
contents: write
18+
steps:
19+
- uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
- name: Split and mirror core package
23+
env:
24+
CORE_MIRROR_REPO: ${{ secrets.CORE_MIRROR_REPO }}
25+
CORE_MIRROR_TOKEN: ${{ secrets.CORE_MIRROR_TOKEN }}
26+
INPUT_TAG: ${{ github.event.inputs.tag }}
27+
GITHUB_REF_NAME: ${{ github.ref_name }}
28+
run: bash scripts/split-webentor-core.sh

.github/workflows/split-webentor-setup.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: split-webentor-setup
33
on:
44
push:
55
tags:
6-
- 'v*'
6+
- 'setup-v*'
77
workflow_dispatch:
88
inputs:
99
tag:

.github/workflows/split-webentor-starter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: split-webentor-starter
33
on:
44
push:
55
tags:
6-
- 'v*'
6+
- 'starter-v*'
77
workflow_dispatch:
88
inputs:
99
tag:

docs/src/compatibility-matrix.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,5 @@ IE11 is not supported.
4343
- PHP 8.2 may work in some configurations but is no longer the tested minimum.
4444
- The compatibility matrix is updated with each release. Consult the
4545
`CHANGELOG.md` in each package for version-specific changes.
46+
- Monorepo mirror triggers use namespaced tags (`core-v*`, `setup-v*`, `starter-v*`),
47+
while mirror repositories receive normalized `vX.Y.Z` tags.

docs/src/contributing/developer-playbook.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,20 @@ Repository automation is split by trigger type so CI stays fast and release step
6363
- `.github/workflows/demo-bump.yml`:
6464
- Runs after `release.yml` completes successfully.
6565
- Invokes `scripts/bump-demo.sh` to trigger downstream demo integration bump flow (placeholder implementation).
66-
- `.github/workflows/split-webentor-setup.yml` and `.github/workflows/split-webentor-starter.yml`:
67-
- Run on `v*` tags (or manual dispatch).
66+
- `.github/workflows/split-webentor-core.yml`, `.github/workflows/split-webentor-setup.yml`, and `.github/workflows/split-webentor-starter.yml`:
67+
- Run on namespaced monorepo tags (`core-v*`, `setup-v*`, `starter-v*`) or manual dispatch.
6868
- Use subtree split scripts to mirror package contents to standalone repositories.
69+
- Mirror repositories receive normalized semver tags (`vX.Y.Z`) for downstream package tooling compatibility.
6970

7071
```mermaid
7172
flowchart LR
7273
pushOrPr["Push_or_PR"] --> ci["ci.yml"]
7374
pushMain["Push_main"] --> release["release.yml"]
7475
release --> demoBump["demo-bump.yml"]
7576
pushMainDocs["Push_main_with_docs_changes"] --> docsDeploy["docs-deploy.yml"]
76-
pushTag["Push_tag_v*"] --> splitSetup["split-webentor-setup.yml"]
77-
pushTag --> splitStarter["split-webentor-starter.yml"]
77+
pushCoreTag["Push_tag_core-v*"] --> splitCore["split-webentor-core.yml"]
78+
pushSetupTag["Push_tag_setup-v*"] --> splitSetup["split-webentor-setup.yml"]
79+
pushStarterTag["Push_tag_starter-v*"] --> splitStarter["split-webentor-starter.yml"]
7880
```
7981

8082
## How to change and release a package
@@ -91,7 +93,11 @@ Use this sequence for package changes so CI, releases, and downstream integratio
9193
4. Merge the PR into `main`; `release.yml` then opens/updates the "Version Packages" PR.
9294
5. Merge the version PR; Changesets bumps versions/changelogs and publishes npm packages.
9395
6. Confirm `demo-bump.yml` ran successfully after release.
94-
7. Push a `v*` tag when you want to trigger split mirrors for setup/starter repositories.
96+
7. Push a namespaced tag when you want to trigger a specific split mirror:
97+
1. `core-v*` -> `split-webentor-core.yml`
98+
2. `setup-v*` -> `split-webentor-setup.yml`
99+
3. `starter-v*` -> `split-webentor-starter.yml`
100+
4. Mirror scripts normalize these to `vX.Y.Z` tags in target repositories.
95101

96102
## Release and rollout order
97103

@@ -102,11 +108,14 @@ When changes span multiple packages, keep this order and map each stage to autom
102108
- `release.yml` + Changesets handles version PR and npm publish after merge.
103109
2. `webentor-setup` (include upgrade recipe when behavior changes)
104110
- Validate runtime/CLI contract updates.
105-
- Trigger split mirror via `v*` tag when ready.
111+
- Trigger split mirror via `setup-v*` tag when ready.
106112
3. `webentor-starter`
107113
- Validate integrated behavior against updated package outputs.
108-
- Trigger split mirror via `v*` tag when ready.
109-
4. `webentor-demo` integration validation and bump
114+
- Trigger split mirror via `starter-v*` tag when ready.
115+
4. `webentor-core` mirror (for standalone Composer delivery)
116+
- Trigger split mirror via `core-v*` tag when ready.
117+
- Confirm target mirror tag is normalized to `vX.Y.Z`.
118+
5. `webentor-demo` integration validation and bump
110119
- Validate downstream compatibility after release.
111120
- `demo-bump.yml` is the automation hook for this handoff.
112121

docs/src/onboarding/setup-init.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ You have nothing locally and want a runnable Webentor project. Start here.
1414
## 2. Clone starter project
1515

1616
```bash
17-
# TODO: replace <starter-repo-url> with your internal starter/reference URL
18-
git clone <starter-repo-url> <project-dir>
19-
cd <project-dir>
17+
git clone https://github.com/Webikon/webentor-starter webentor-starter
18+
cd webentor-starter
2019
```
2120

2221
## 3. Initialize project metadata and setup contract

packages/webentor-core/.npmrc

Lines changed: 0 additions & 2 deletions
This file was deleted.

packages/webentor-core/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
"eslint-config-prettier": "^10.1.8",
7070
"eslint-plugin-prettier": "^5.5.4",
7171
"eslint-plugin-react": "^7.37.5",
72+
"glob": "^13.0.6",
7273
"husky": "^9.1.7",
7374
"lint-staged": "^16.2.7",
7475
"patch-package": "^8.0.1",

0 commit comments

Comments
 (0)