diff --git a/.github/workflows/check-build.yml b/.github/workflows/check-build.yml index 356c8bbf6..831cb86fd 100644 --- a/.github/workflows/check-build.yml +++ b/.github/workflows/check-build.yml @@ -2,9 +2,9 @@ name: 'Build ๐Ÿ—๏ธ' on: pull_request: - branches: [develop, staging, master, feature/**] + branches: [develop, master, feature/**] push: - branches: [develop, staging, master, feature/**] + branches: [develop, master, feature/**] workflow_dispatch: diff --git a/.github/workflows/check-lint.yml b/.github/workflows/check-lint.yml index 05034f9b4..270f9ddba 100644 --- a/.github/workflows/check-lint.yml +++ b/.github/workflows/check-lint.yml @@ -2,7 +2,7 @@ name: 'Clean ๐Ÿงน' on: pull_request: - branches: [develop, staging, master, feature/**] + branches: [develop, master, feature/**] workflow_dispatch: diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index a305f3e08..ad722223b 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -2,7 +2,7 @@ name: 'Scan ๐Ÿ”Ž' on: pull_request: - branches: [develop, staging, master, feature/**] + branches: [develop, master, feature/**] schedule: # โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ minute (0 - 59) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7628a74e6..96b9d64b7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,10 +4,10 @@ on: workflow_dispatch: pull_request: - branches: [develop, staging, master, feature/**] + branches: [develop, master, feature/**] push: - branches: [develop, staging, master, feature/**] + branches: [develop, master, feature/**] jobs: build_code: diff --git a/CLAUDE.md b/CLAUDE.md index 799b1ea74..b5073a89f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -135,9 +135,12 @@ yarn generate:release # Review version bumps and changelog ### Branch Strategy -- Main development branch: `develop` -- Main branch for releases: `master` -- Release PRs should start with `[RELEASE]` in title +Two-branch model (the previous `staging` branch was retired May 2026): + +- **`develop`** โ€” main development branch. All feature, fix, and chore PRs target it. Every push to `develop` deploys to the staging Netlify environment (`develop--tangle-{cloud,dapp,leaderboard}.netlify.app`, aliased at `staging.{cloud,app,leaderboard}.tangle.tools` when configured). +- **`master`** โ€” production. Promotions happen automatically via the `auto-sync-master-with-develop.yml` workflow: a push to `develop` whose head commit message starts with `[RELEASE]` fast-forwards `master` to that commit and fires the production Netlify deploy. No manual cherry-pick, no separate release branch. +- **Release PR titles must start with `[RELEASE]`** so the auto-sync workflow promotes the merge commit to master. +- Hotfixes follow the same flow: PR into `develop` with a `[RELEASE]`-tagged final commit (e.g. via `gh pr merge --squash --subject "[RELEASE] fix: โ€ฆ"`). ### Prerequisites diff --git a/apps/leaderboard/netlify.toml b/apps/leaderboard/netlify.toml index 6bc75bb3c..ba1de17e0 100644 --- a/apps/leaderboard/netlify.toml +++ b/apps/leaderboard/netlify.toml @@ -10,5 +10,10 @@ # covered (it's inside apps/leaderboard/), and any source/config/ # lockfile change also re-triggers. # - # Non-master branches always build (gives PR-preview deploys). + # Non-master branches always build (gives PR-preview + develop-branch + # deploys). The `develop` branch deploy is our staging environment โ€” + # surfaced at develop--tangle-leaderboard.netlify.app and, when DNS + # aliases are configured, at staging.leaderboard.tangle.tools. The + # legacy `staging` git branch has been retired (May 2026); promotions + # go develop โ†’ master via the `[RELEASE]`-tagged auto-sync workflow. ignore = "[ \"$BRANCH\" != \"master\" ] && exit 1 || git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF -- apps/leaderboard/ libs/ package.json yarn.lock tsconfig.base.json nx.json && exit 0 || exit 1" diff --git a/apps/tangle-cloud/netlify.toml b/apps/tangle-cloud/netlify.toml index abbc4ab6d..b2cdbefc5 100644 --- a/apps/tangle-cloud/netlify.toml +++ b/apps/tangle-cloud/netlify.toml @@ -10,7 +10,12 @@ # implicitly covered (it's inside apps/tangle-cloud/), and any source/ # config/lockfile change also re-triggers. # - # Non-master branches always build (gives PR-preview deploys). + # Non-master branches always build (gives PR-preview + develop-branch + # deploys). The `develop` branch deploy is our staging environment โ€” + # surfaced at develop--tangle-cloud.netlify.app and, when DNS aliases + # are configured, at staging.cloud.tangle.tools. The legacy `staging` + # git branch has been retired (May 2026); promotions go develop โ†’ master + # via the `[RELEASE]`-tagged auto-sync workflow. ignore = "[ \"$BRANCH\" != \"master\" ] && exit 1 || git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF -- apps/tangle-cloud/ libs/ package.json yarn.lock tsconfig.base.json nx.json && exit 0 || exit 1" # โ”€โ”€โ”€ Per-context environment โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ @@ -36,7 +41,8 @@ VITE_BLUEPRINT_IFRAME_ENABLED = "true" [context.branch-deploy.environment] - # Same default for any non-master branch deploy (e.g. staging). + # Same default for any non-master branch deploy. The primary branch + # deploy is `develop`, which serves as our staging environment. VITE_BLUEPRINT_IFRAME_ENABLED = "true" # โ”€โ”€โ”€ Security headers โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ diff --git a/apps/tangle-dapp/netlify.toml b/apps/tangle-dapp/netlify.toml index 46201c0f6..adfda4a80 100644 --- a/apps/tangle-dapp/netlify.toml +++ b/apps/tangle-dapp/netlify.toml @@ -10,7 +10,12 @@ # implicitly covered (it's inside apps/tangle-dapp/), and any source/ # config/lockfile change also re-triggers. # - # Non-master branches always build (gives PR-preview deploys). + # Non-master branches always build (gives PR-preview + develop-branch + # deploys). The `develop` branch deploy is our staging environment โ€” + # surfaced at develop--tangle-dapp.netlify.app and, when DNS aliases + # are configured, at staging.app.tangle.tools. The legacy `staging` git + # branch has been retired (May 2026); promotions go develop โ†’ master + # via the `[RELEASE]`-tagged auto-sync workflow. ignore = "[ \"$BRANCH\" != \"master\" ] && exit 1 || git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF -- apps/tangle-dapp/ libs/ package.json yarn.lock tsconfig.base.json nx.json && exit 0 || exit 1" # โ”€โ”€โ”€ Cache headers โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€