Skip to content

Commit 6633a40

Browse files
committed
Initialize stack
0 parents  commit 6633a40

509 files changed

Lines changed: 67829 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Changesets
2+
3+
Use `pnpm changeset` when package changes should produce a version bump.
4+
5+
Packages currently released from this monorepo:
6+
7+
- `@webikon/webentor-configs`
8+
- `@webikon/webentor-core` (npm artifact)
9+
- `webikon/webentor-core` (Composer artifact managed in parallel)

.changeset/config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json",
3+
"changelog": ["@changesets/changelog-github", { "repo": "webikon/webentor-stack" }],
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "public",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

.cursor/rules/release-workflow.mdc

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
description: Monorepo release workflow for package versioning, publishing, and mirror handoff
3+
alwaysApply: false
4+
---
5+
6+
# Webentor Release Workflow
7+
8+
Use these steps whenever a request involves releasing, versioning, publishing, or post-release validation.
9+
10+
1. Pre-release checks:
11+
- Confirm CI is green for the target branch/PR.
12+
- Confirm a changeset exists in `.changeset/` for package changes.
13+
2. Add/update changeset:
14+
- Run `pnpm changeset`.
15+
- Select affected package(s) and semver bump type.
16+
- Write a short, user-facing summary.
17+
3. PR flow:
18+
- Open PR and wait for `ci.yml` checks to pass.
19+
- Merge to `main` only after CI and reviewer approval.
20+
4. Automated versioning/publish:
21+
- `release.yml` runs on push to `main`.
22+
- Changesets action opens/updates the "Version Packages" PR.
23+
- Merging that PR updates package versions/changelogs and publishes to npm.
24+
5. Post-release automation:
25+
- `demo-bump.yml` runs after release success and calls `scripts/bump-demo.sh`.
26+
- This is currently a placeholder handoff for downstream integration.
27+
6. Mirror flow:
28+
- Push a `v*` tag to trigger `split-webentor-setup.yml` and `split-webentor-starter.yml`.
29+
- Mirrors use `git subtree split` to publish package contents to standalone repos.
30+
7. Validation:
31+
- Verify published versions for `webentor-core` and `webentor-configs` on npm.
32+
- Verify mirror repos received updates for `webentor-setup` and `webentor-starter`.
33+
34+
## Guardrails
35+
36+
- Only `webentor-core` and `webentor-configs` are npm-published via Changesets.
37+
- `webentor-setup` and `webentor-starter` are delivered via split-mirror workflows.
38+
- Changesets baseline config is `.changeset/config.json` (`baseBranch: main`, `access: public`).
39+
- Required GitHub secrets for demo bump workflow: `WEBENTOR_DEMO_REPO`, `WEBENTOR_DEMO_TOKEN`.

.github/workflows/ci.yml

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
name: ci
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
8+
jobs:
9+
changes:
10+
runs-on: ubuntu-latest
11+
outputs:
12+
core: ${{ steps.filter.outputs.core }}
13+
configs: ${{ steps.filter.outputs.configs }}
14+
setup: ${{ steps.filter.outputs.setup }}
15+
starter: ${{ steps.filter.outputs.starter }}
16+
docs: ${{ steps.filter.outputs.docs }}
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: dorny/paths-filter@v3
20+
id: filter
21+
with:
22+
filters: |
23+
core:
24+
- 'packages/webentor-core/**'
25+
configs:
26+
- 'packages/webentor-configs/**'
27+
setup:
28+
- 'packages/webentor-setup/**'
29+
starter:
30+
- 'packages/webentor-starter/**'
31+
docs:
32+
- 'docs/**'
33+
34+
core:
35+
needs: [changes]
36+
if: ${{ needs.changes.outputs.core == 'true' }}
37+
runs-on: ubuntu-latest
38+
steps:
39+
- uses: actions/checkout@v4
40+
- uses: actions/setup-node@v4
41+
with:
42+
node-version: '20'
43+
- name: Enable corepack
44+
run: corepack enable
45+
- name: Install core deps
46+
run: pnpm install --ignore-scripts --filter './packages/webentor-core...'
47+
- name: Lint/build/test core
48+
run: |
49+
pnpm --filter './packages/webentor-core' --if-present run lint
50+
pnpm --filter './packages/webentor-core' --if-present run build
51+
pnpm --filter './packages/webentor-core' --if-present run test
52+
53+
configs:
54+
needs: [changes]
55+
if: ${{ needs.changes.outputs.configs == 'true' }}
56+
runs-on: ubuntu-latest
57+
steps:
58+
- uses: actions/checkout@v4
59+
- uses: actions/setup-node@v4
60+
with:
61+
node-version: '20'
62+
- name: Enable corepack
63+
run: corepack enable
64+
- name: Install configs deps
65+
run: pnpm install --ignore-scripts --filter './packages/webentor-configs...'
66+
- name: Lint/build/test configs
67+
run: |
68+
pnpm --filter './packages/webentor-configs' --if-present run lint
69+
pnpm --filter './packages/webentor-configs' --if-present run build
70+
pnpm --filter './packages/webentor-configs' --if-present run test
71+
72+
setup:
73+
needs: [changes]
74+
if: ${{ needs.changes.outputs.setup == 'true' }}
75+
runs-on: ubuntu-latest
76+
steps:
77+
- uses: actions/checkout@v4
78+
- name: Validate shell scripts
79+
run: |
80+
find packages/webentor-setup -type f -name '*.sh' -print0 | xargs -0 -n1 bash -n
81+
- name: Validate setup CLI PHP
82+
run: |
83+
php -l packages/webentor-setup/src/webentor-setup.php
84+
85+
starter:
86+
needs: [changes]
87+
if: ${{ needs.changes.outputs.starter == 'true' }}
88+
runs-on: ubuntu-latest
89+
steps:
90+
- uses: actions/checkout@v4
91+
- uses: shivammathur/setup-php@v2
92+
with:
93+
php-version: '8.2'
94+
- uses: actions/setup-node@v4
95+
with:
96+
node-version: '20'
97+
- name: Enable corepack
98+
run: corepack enable
99+
- name: Install starter root dependencies
100+
working-directory: packages/webentor-starter
101+
run: composer install --no-interaction --prefer-dist
102+
- name: Build starter theme
103+
working-directory: packages/webentor-starter/web/app/themes/webentor-theme-v2
104+
run: |
105+
pnpm install --ignore-scripts
106+
pnpm build
107+
108+
docs:
109+
needs: [changes]
110+
if: ${{ needs.changes.outputs.docs == 'true' }}
111+
runs-on: ubuntu-latest
112+
steps:
113+
- uses: actions/checkout@v4
114+
- uses: actions/setup-node@v4
115+
with:
116+
node-version: '20'
117+
- name: Enable corepack
118+
run: corepack enable
119+
- name: Build docs
120+
run: |
121+
pnpm --dir docs install --ignore-scripts
122+
pnpm --dir docs docs:build

.github/workflows/demo-bump.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: demo-bump
2+
3+
on:
4+
workflow_run:
5+
workflows: ['release']
6+
types: [completed]
7+
8+
jobs:
9+
bump:
10+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Trigger demo bump automation
15+
env:
16+
WEBENTOR_DEMO_REPO: ${{ secrets.WEBENTOR_DEMO_REPO }}
17+
WEBENTOR_DEMO_TOKEN: ${{ secrets.WEBENTOR_DEMO_TOKEN }}
18+
RELEASE_SHA: ${{ github.event.workflow_run.head_sha }}
19+
run: bash scripts/bump-demo.sh

.github/workflows/docs-deploy.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: docs-deploy
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- 'docs/**'
8+
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-node@v4
17+
with:
18+
node-version: '20'
19+
- name: Enable corepack
20+
run: corepack enable
21+
- name: Build docs
22+
run: |
23+
pnpm --dir docs install
24+
pnpm --dir docs docs:build
25+
- name: Deploy docs
26+
uses: peaceiris/actions-gh-pages@v4
27+
with:
28+
github_token: ${{ secrets.GITHUB_TOKEN }}
29+
publish_dir: ./docs/src/.vitepress/dist

.github/workflows/release.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: release
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
release:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: write
12+
packages: write
13+
pull-requests: write
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: '20'
21+
- name: Enable corepack
22+
run: corepack enable
23+
- name: Install dependencies
24+
run: pnpm install --ignore-scripts
25+
26+
# Changesets manages independent package versions in monorepo.
27+
- name: Version and publish
28+
uses: changesets/action@v1
29+
with:
30+
publish: pnpm -r --filter './packages/webentor-configs' --filter './packages/webentor-core' publish --access public --no-git-checks
31+
commit: 'chore(release): version packages'
32+
title: 'chore(release): version packages'
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: split-webentor-setup
2+
3+
on:
4+
push:
5+
tags:
6+
- '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 setup package
23+
env:
24+
SETUP_MIRROR_REPO: ${{ secrets.SETUP_MIRROR_REPO }}
25+
SETUP_MIRROR_TOKEN: ${{ secrets.SETUP_MIRROR_TOKEN }}
26+
INPUT_TAG: ${{ github.event.inputs.tag }}
27+
GITHUB_REF_NAME: ${{ github.ref_name }}
28+
run: bash scripts/split-webentor-setup.sh
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: split-webentor-starter
2+
3+
on:
4+
push:
5+
tags:
6+
- '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 starter package
23+
env:
24+
STARTER_MIRROR_REPO: ${{ secrets.STARTER_MIRROR_REPO }}
25+
STARTER_MIRROR_TOKEN: ${{ secrets.STARTER_MIRROR_TOKEN }}
26+
INPUT_TAG: ${{ github.event.inputs.tag }}
27+
GITHUB_REF_NAME: ${{ github.ref_name }}
28+
run: bash scripts/split-webentor-starter.sh

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules/
2+
.pnpm-store/
3+
coverage/
4+
dist/
5+
.DS_Store

0 commit comments

Comments
 (0)