This document describes the step-by-step process for creating a production release of OGCOPS.
feature branches → PR to dev (upstream) → merge → PR to production → merge → release → sync back to dev
| Branch | Purpose |
|---|---|
dev |
Default branch. All feature PRs target this branch. |
production |
Stable release branch. Only accepts PRs from dev. |
We follow Semantic Versioning:
patch(1.0.0 → 1.0.1): Bug fixes, minor CSS tweaksminor(1.0.0 → 1.1.0): New features, new templates, UI improvementsmajor(1.0.0 → 2.0.0): Breaking API changes, major redesigns
- All feature PRs merged into
dev -
npm run checkpasses (TypeScript + Astro type-check) -
npm run testpasses -
npm run buildsucceeds - Manual testing on desktop and mobile
- No unresolved critical issues
cd ogcops
git fetch upstream
git checkout dev
git pull upstream dev
npm run check && npm run test && npm run buildgh pr create \
--repo codercops/ogcops \
--head dev \
--base production \
--title "release: vX.Y.Z — Short description" \
--body "$(cat <<'EOF'
## Release vX.Y.Z
Brief summary of what's in this release.
### Fixes
- ...
### Enhancements
- ...
### Docs & Chores
- ...
### Test Plan
- [ ] ...
EOF
)"- Ensure CI passes on the PR
- Review the diff one final time
- Squash and merge into
production
gh release create vX.Y.Z \
--repo codercops/ogcops \
--target production \
--title "vX.Y.Z — Short description" \
--notes "$(cat <<'EOF'
## What's Changed
### Fixes
- ...
### Enhancements
- ...
### Docs & Chores
- ...
**Full Changelog**: https://github.com/codercops/ogcops/compare/vPREVIOUS...vX.Y.Z
EOF
)"Since dev has branch protection, create a sync PR:
gh pr create \
--repo codercops/ogcops \
--head production \
--base dev \
--title "chore: sync production into dev after vX.Y.Z release" \
--body "Syncs production back into dev after the [vX.Y.Z release](https://github.com/codercops/ogcops/releases/tag/vX.Y.Z)."Then merge this PR (use regular merge, NOT squash, to keep history aligned).
git fetch upstream
git checkout dev
git pull upstream dev
git push origin devReplace X.Y.Z with the actual version and PREVIOUS with the last release tag.
# Step 1: Verify
npm run check && npm run test && npm run build
# Step 2: Release PR
gh pr create --repo codercops/ogcops --head dev --base production \
--title "release: vX.Y.Z — Description"
# Step 3: Merge the PR on GitHub (squash and merge)
# Step 4: Create release
gh release create vX.Y.Z --repo codercops/ogcops --target production \
--title "vX.Y.Z — Description" --generate-notes
# Step 5: Sync PR
gh pr create --repo codercops/ogcops --head production --base dev \
--title "chore: sync production into dev after vX.Y.Z release"
# Step 6: Merge the sync PR on GitHub (regular merge, NOT squash)
# Step 7: Update fork
git fetch upstream && git checkout dev && git pull upstream dev && git push origin dev- The
pr-target-check.ymlworkflow enforces that onlydevcan PR intoproduction. - CI runs on all PRs to both
devandproductionbranches. - Vercel auto-deploys
productionafter merge. - Use
--generate-notesflag ongh release createto auto-generate changelog from commits.