mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-13 04:14:57 +00:00
chore: rename integration branch from beta to dev
Update CI/CD configuration, documentation, and scripts to use dev as the primary integration branch instead of beta. Changes include GitHub Actions workflow triggers, semantic-release configuration, and all relevant documentation and helper scripts.
This commit is contained in:
1 parent
1aef3cf677
commit
9f40a0e255
6 files changed
+88
-88
No files matched your search
@@ -4,7 +4,7 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- beta
|
||||
- dev
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"branches": [
|
||||
"main",
|
||||
{ "name": "beta", "prerelease": true }
|
||||
{ "name": "dev", "prerelease": true }
|
||||
],
|
||||
"plugins": [
|
||||
"@semantic-release/commit-analyzer",
|
||||
|
||||
@@ -159,22 +159,22 @@ git commit -m "WIP"
|
||||
### Branch Hierarchy
|
||||
|
||||
```
|
||||
main (production) ← beta (integration) ← feat/* | fix/* | docs/*
|
||||
↑ ↑
|
||||
│ └── All development merges here FIRST
|
||||
main (production) ← dev (integration) ← feat/* | fix/* | docs/*
|
||||
↑ ↑
|
||||
│ └── All development merges here FIRST
|
||||
│
|
||||
└── Only receives: (1) Tested code from beta, (2) Hotfixes
|
||||
└── Only receives: (1) Tested code from dev, (2) Hotfixes
|
||||
```
|
||||
|
||||
### Branch Types
|
||||
|
||||
| Branch | Purpose | Merges From | Releases To |
|
||||
|--------|---------|-------------|-------------|
|
||||
| `main` | Production-ready | `beta`, `hotfix/*` | npm `@latest` |
|
||||
| `beta` | Integration/staging | `feat/*`, `fix/*`, `docs/*` | npm `@beta` |
|
||||
| `feat/*` | New features | - | → `beta` |
|
||||
| `fix/*` | Bug fixes | - | → `beta` |
|
||||
| `docs/*` | Documentation | - | → `beta` |
|
||||
| `main` | Production-ready | `dev`, `hotfix/*` | npm `@latest` |
|
||||
| `dev` | Integration/staging | `feat/*`, `fix/*`, `docs/*` | npm `@dev` |
|
||||
| `feat/*` | New features | - | → `dev` |
|
||||
| `fix/*` | Bug fixes | - | → `dev` |
|
||||
| `docs/*` | Documentation | - | → `dev` |
|
||||
| `hotfix/*` | Critical production fixes | - | → `main` directly |
|
||||
|
||||
### Branch Naming Convention
|
||||
@@ -189,34 +189,34 @@ docs/update-installation-guide
|
||||
hotfix/critical-auth-bug
|
||||
```
|
||||
|
||||
### Standard Development Workflow (Features/Fixes → Beta → Main)
|
||||
### Standard Development Workflow (Features/Fixes → Dev → Main)
|
||||
|
||||
```bash
|
||||
# 1. ALWAYS start from beta (integration branch)
|
||||
git checkout beta
|
||||
git pull origin beta
|
||||
# 1. ALWAYS start from dev (integration branch)
|
||||
git checkout dev
|
||||
git pull origin dev
|
||||
|
||||
# 2. Create feature branch FROM BETA
|
||||
# 2. Create feature branch FROM DEV
|
||||
git checkout -b feat/my-feature
|
||||
|
||||
# 3. Make changes with conventional commits
|
||||
git commit -m "feat(scope): add new feature"
|
||||
git commit -m "test(scope): add unit tests"
|
||||
|
||||
# 4. Push and create PR to BETA (not main!)
|
||||
# 4. Push and create PR to DEV (not main!)
|
||||
git push -u origin feat/my-feature
|
||||
gh pr create --base beta --title "feat(scope): add new feature"
|
||||
# → Merge triggers npm @beta release for testing
|
||||
gh pr create --base dev --title "feat(scope): add new feature"
|
||||
# → Merge triggers npm @dev release for testing
|
||||
|
||||
# 5. After testing in beta, promote to main (MUST use feat: or fix: prefix!)
|
||||
git checkout beta
|
||||
gh pr create --base main --title "feat(release): promote beta to main"
|
||||
# 5. After testing in dev, promote to main (MUST use feat: or fix: prefix!)
|
||||
git checkout dev
|
||||
gh pr create --base main --title "feat(release): promote dev to main"
|
||||
# → Merge triggers npm @latest release
|
||||
# WARNING: Using "chore:" will NOT trigger a release!
|
||||
|
||||
# 6. Clean up
|
||||
git checkout beta
|
||||
git pull origin beta
|
||||
git checkout dev
|
||||
git pull origin dev
|
||||
git branch -d feat/my-feature
|
||||
```
|
||||
|
||||
@@ -233,39 +233,39 @@ git checkout -b hotfix/critical-bug
|
||||
# 3. Fix and commit
|
||||
git commit -m "fix: critical authentication bypass"
|
||||
|
||||
# 4. PR directly to main (skip beta)
|
||||
# 4. PR directly to main (skip dev)
|
||||
gh pr create --base main --title "fix: critical authentication bypass"
|
||||
# → Merge triggers immediate npm @latest release
|
||||
|
||||
# 5. Sync hotfix back to beta
|
||||
git checkout beta
|
||||
git pull origin beta
|
||||
# 5. Sync hotfix back to dev
|
||||
git checkout dev
|
||||
git pull origin dev
|
||||
git merge main
|
||||
git push origin beta
|
||||
git push origin dev
|
||||
|
||||
# 6. Clean up
|
||||
git branch -d hotfix/critical-bug
|
||||
```
|
||||
|
||||
### Keeping Beta in Sync with Main
|
||||
### Keeping Dev in Sync with Main
|
||||
|
||||
```bash
|
||||
# After any main release, sync to beta
|
||||
git checkout beta
|
||||
git pull origin beta
|
||||
# After any main release, sync to dev
|
||||
git checkout dev
|
||||
git pull origin dev
|
||||
git merge main
|
||||
git push origin beta
|
||||
git push origin dev
|
||||
```
|
||||
|
||||
### Rules
|
||||
|
||||
1. **NEVER commit directly to `main` or `beta`** - always use PRs
|
||||
2. **ALWAYS create feature branches from `beta`** (not main)
|
||||
1. **NEVER commit directly to `main` or `dev`** - always use PRs
|
||||
2. **ALWAYS create feature branches from `dev`** (not main)
|
||||
3. **Only `hotfix/*` branches go directly to `main`**
|
||||
4. **`beta` must always be up-to-date with `main`**
|
||||
4. **`dev` must always be up-to-date with `main`**
|
||||
5. **Delete feature branches after merge**
|
||||
6. **Test in `@beta` before promoting to `@latest`**
|
||||
7. **beta→main PRs MUST use `feat:` or `fix:` prefix** - `chore:` won't trigger npm release
|
||||
6. **Test in `@dev` before promoting to `@latest`**
|
||||
7. **dev→main PRs MUST use `feat:` or `fix:` prefix** - `chore:` won't trigger npm release
|
||||
|
||||
## Automated Releases (DO NOT MANUALLY TAG)
|
||||
|
||||
@@ -275,7 +275,7 @@ git push origin beta
|
||||
| Branch | npm Tag | When |
|
||||
|--------|---------|------|
|
||||
| `main` | `@latest` | Merge PR to main |
|
||||
| `beta` | `@beta` | Push to beta branch |
|
||||
| `dev` | `@dev` | Push to dev branch |
|
||||
|
||||
### What CI Does Automatically
|
||||
1. Analyzes commits since last release
|
||||
|
||||
+33
-33
@@ -99,22 +99,22 @@ Test on all platforms before submitting PR:
|
||||
#### Branch Hierarchy
|
||||
|
||||
```
|
||||
main (production) ← beta (integration) ← feat/* | fix/* | docs/*
|
||||
↑ ↑
|
||||
│ └── All contributions merge here FIRST
|
||||
main (production) ← dev (integration) ← feat/* | fix/* | docs/*
|
||||
↑ ↑
|
||||
│ └── All contributions merge here FIRST
|
||||
│
|
||||
└── Only: tested beta code OR hotfix/*
|
||||
└── Only: tested dev code OR hotfix/*
|
||||
```
|
||||
|
||||
#### Branch Types
|
||||
|
||||
| Branch | Purpose | PRs Target | Releases To |
|
||||
|--------|---------|------------|-------------|
|
||||
| `main` | Production | From `beta` only | npm `@latest` |
|
||||
| `beta` | Integration/testing | From `feat/*`, `fix/*` | npm `@beta` |
|
||||
| `feat/*` | New features | → `beta` | - |
|
||||
| `fix/*` | Bug fixes | → `beta` | - |
|
||||
| `docs/*` | Documentation | → `beta` | - |
|
||||
| `main` | Production | From `dev` only | npm `@latest` |
|
||||
| `dev` | Integration/testing | From `feat/*`, `fix/*` | npm `@dev` |
|
||||
| `feat/*` | New features | → `dev` | - |
|
||||
| `fix/*` | Bug fixes | → `dev` | - |
|
||||
| `docs/*` | Documentation | → `dev` | - |
|
||||
| `hotfix/*` | Critical fixes | → `main` directly | npm `@latest` |
|
||||
|
||||
#### Branch Naming Convention
|
||||
@@ -139,11 +139,11 @@ cd ccs
|
||||
# 2. Add upstream remote
|
||||
git remote add upstream https://github.com/kaitranntt/ccs.git
|
||||
|
||||
# 3. ALWAYS start from latest BETA (not main!)
|
||||
git checkout beta
|
||||
git pull upstream beta
|
||||
# 3. ALWAYS start from latest DEV (not main!)
|
||||
git checkout dev
|
||||
git pull upstream dev
|
||||
|
||||
# 4. Create feature branch FROM BETA
|
||||
# 4. Create feature branch FROM DEV
|
||||
git checkout -b feat/my-feature # for features
|
||||
git checkout -b fix/bug-name # for bug fixes
|
||||
git checkout -b docs/update-readme # for documentation
|
||||
@@ -154,16 +154,16 @@ git commit -m "feat(scope): add new feature"
|
||||
# 6. Push to your fork
|
||||
git push -u origin feat/my-feature
|
||||
|
||||
# 7. Create PR targeting BETA (not main!)
|
||||
gh pr create --base beta --title "feat(scope): add new feature"
|
||||
# → After merge, your changes release to npm @beta for testing
|
||||
# 7. Create PR targeting DEV (not main!)
|
||||
gh pr create --base dev --title "feat(scope): add new feature"
|
||||
# → After merge, your changes release to npm @dev for testing
|
||||
|
||||
# 8. Maintainers will promote tested beta to main
|
||||
# 8. Maintainers will promote tested dev to main
|
||||
# → This triggers npm @latest release
|
||||
|
||||
# 9. After PR merged, clean up
|
||||
git checkout beta
|
||||
git pull upstream beta
|
||||
git checkout dev
|
||||
git pull upstream dev
|
||||
git branch -d feat/my-feature
|
||||
```
|
||||
|
||||
@@ -181,18 +181,18 @@ git checkout -b hotfix/critical-bug
|
||||
# 3. Fix and commit
|
||||
git commit -m "fix: critical security vulnerability"
|
||||
|
||||
# 4. PR directly to main (skip beta)
|
||||
# 4. PR directly to main (skip dev)
|
||||
gh pr create --base main --title "fix: critical security vulnerability"
|
||||
|
||||
# 5. After merge, sync to beta
|
||||
# 5. After merge, sync to dev
|
||||
# (Maintainers will handle this)
|
||||
```
|
||||
|
||||
#### Rules
|
||||
|
||||
- **NEVER** commit directly to `main` or `beta`
|
||||
- **ALWAYS** create branches from `beta` (not main)
|
||||
- **ALWAYS** target PRs to `beta` (not main)
|
||||
- **NEVER** commit directly to `main` or `dev`
|
||||
- **ALWAYS** create branches from `dev` (not main)
|
||||
- **ALWAYS** target PRs to `dev` (not main)
|
||||
- **ONLY** `hotfix/*` branches target `main` directly
|
||||
- **DELETE** branches after merge
|
||||
|
||||
@@ -200,15 +200,15 @@ gh pr create --base main --title "fix: critical security vulnerability"
|
||||
|
||||
#### Before Submitting
|
||||
|
||||
1. Ensure branch is from `beta` (not main)
|
||||
1. Ensure branch is from `dev` (not main)
|
||||
2. Ensure branch follows naming: `feat/*`, `fix/*`, `docs/*`
|
||||
3. Run `bun run validate` - must pass
|
||||
4. Rebase on latest beta: `git rebase beta`
|
||||
4. Rebase on latest dev: `git rebase dev`
|
||||
5. Test on all platforms if possible
|
||||
|
||||
#### Pull Request Requirements
|
||||
|
||||
- **Target `beta` branch** (not main!) - unless hotfix
|
||||
- **Target `dev` branch** (not main!) - unless hotfix
|
||||
- Clear description of changes
|
||||
- Testing instructions if applicable
|
||||
- Link to relevant issues
|
||||
@@ -401,7 +401,7 @@ Be respectful, constructive, and focused on the project's philosophy of simplici
|
||||
### How Releases Work
|
||||
|
||||
1. **Write conventional commits** during development
|
||||
2. **Merge PR to `main`** (or push to `beta`)
|
||||
2. **Merge PR to `main`** (or push to `dev`)
|
||||
3. **CI automatically:**
|
||||
- Analyzes commits since last release
|
||||
- Determines version bump from commit types
|
||||
@@ -415,7 +415,7 @@ Be respectful, constructive, and focused on the project's philosophy of simplici
|
||||
| Branch | npm Tag | Use Case |
|
||||
|--------|---------|----------|
|
||||
| `main` | `@latest` | Stable production releases |
|
||||
| `beta` | `@beta` | Pre-release testing |
|
||||
| `dev` | `@dev` | Pre-release testing |
|
||||
|
||||
### Workflow
|
||||
|
||||
@@ -426,11 +426,11 @@ git commit -m "feat: add new feature"
|
||||
gh pr create --base main
|
||||
# → Merge PR → CI auto-releases to npm @latest
|
||||
|
||||
# Beta release
|
||||
git checkout beta
|
||||
# Dev release
|
||||
git checkout dev
|
||||
git merge feat/experimental
|
||||
git push origin beta
|
||||
# → CI auto-releases to npm @beta
|
||||
git push origin dev
|
||||
# → CI auto-releases to npm @dev
|
||||
```
|
||||
|
||||
**NEVER DO:**
|
||||
|
||||
+13
-13
@@ -9,14 +9,14 @@ CCS uses **semantic-release** for fully automated versioning and releases. Versi
|
||||
| Branch | npm Tag | Example | Description |
|
||||
|--------|---------|---------|-------------|
|
||||
| `main` | `@latest` | `5.1.0` | Stable production releases |
|
||||
| `beta` | `@beta` | `5.1.0-beta.1` | Pre-release testing |
|
||||
| `dev` | `@dev` | `5.1.0-dev.1` | Pre-release testing |
|
||||
|
||||
## How Releases Work
|
||||
|
||||
### Automatic Release (Default)
|
||||
|
||||
1. **Write conventional commits** during development
|
||||
2. **Merge PR to `main`** (or push to `beta`)
|
||||
2. **Merge PR to `main`** (or push to `dev`)
|
||||
3. **CI automatically**:
|
||||
- Analyzes commits to determine version bump
|
||||
- Updates `CHANGELOG.md`
|
||||
@@ -70,15 +70,15 @@ gh pr create --base main
|
||||
# 3. Merge PR → CI auto-releases to npm @latest
|
||||
```
|
||||
|
||||
### Beta Release
|
||||
### Dev Release
|
||||
|
||||
```bash
|
||||
# 1. Switch to beta branch
|
||||
git checkout beta
|
||||
# 1. Switch to dev branch
|
||||
git checkout dev
|
||||
git merge feat/experimental
|
||||
|
||||
# 2. Push → CI auto-releases to npm @beta
|
||||
git push origin beta
|
||||
# 2. Push → CI auto-releases to npm @dev
|
||||
git push origin dev
|
||||
```
|
||||
|
||||
### Installing Different Channels
|
||||
@@ -87,11 +87,11 @@ git push origin beta
|
||||
# Stable (default)
|
||||
npm install -g @kaitranntt/ccs
|
||||
|
||||
# Beta
|
||||
npm install -g @kaitranntt/ccs@beta
|
||||
# Dev
|
||||
npm install -g @kaitranntt/ccs@dev
|
||||
|
||||
# Specific version
|
||||
npm install -g @kaitranntt/ccs@5.1.0-beta.1
|
||||
npm install -g @kaitranntt/ccs@5.1.0-dev.1
|
||||
```
|
||||
|
||||
## Version Files
|
||||
@@ -163,10 +163,10 @@ git commit --amend
|
||||
|
||||
Check if commits include releasable types (`feat:`, `fix:`, `perf:`). Documentation-only commits (`docs:`) don't trigger releases.
|
||||
|
||||
### Beta out of sync with main
|
||||
### Dev out of sync with main
|
||||
|
||||
```bash
|
||||
git checkout beta
|
||||
git checkout dev
|
||||
git rebase main
|
||||
git push --force-with-lease origin beta
|
||||
git push --force-with-lease origin dev
|
||||
```
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
# Releases are now automated via semantic-release:
|
||||
# - Merge to main → stable release (npm @latest)
|
||||
# - Merge to beta → beta release (npm @beta)
|
||||
# - Merge to dev → dev release (npm @dev)
|
||||
#
|
||||
# Version is determined automatically from conventional commits:
|
||||
# - feat: commit → MINOR bump (5.0.2 → 5.1.0)
|
||||
@@ -23,7 +23,7 @@ echo "============================================================="
|
||||
echo "[!] DEPRECATED: This script is for emergency use only."
|
||||
echo ""
|
||||
echo " Releases are now automated via semantic-release."
|
||||
echo " Simply merge to 'main' or 'beta' branch."
|
||||
echo " Simply merge to 'main' or 'dev' branch."
|
||||
echo ""
|
||||
echo " Version is determined from conventional commits:"
|
||||
echo " feat: commit -> MINOR (5.0.2 -> 5.1.0)"
|
||||
|
||||
Reference in new issue
Block a user