This document explains how to publish updates to the unified devpages package using the Option C: Subtree/Separate Repo approach.
study-groups/devops/
├── devpages/
│ ├── packages/ # 🚧 Development Area
│ │ ├── devpages-statekit/ # Individual module development
│ │ ├── devpages-debug/ # Individual module development
│ │ └── [future-modules]/
│ │
│ └── published/ # 📦 Publishing Area
│ └── devpages/ # Unified package for publishing
│ ├── src/
│ │ ├── index.js # Main entry point
│ │ ├── statekit/ # Compiled from packages/devpages-statekit
│ │ └── debug/ # Compiled from packages/devpages-debug
│ ├── dist/ # Built distributions
│ └── package.json # name: "devpages"
study-groups/devpages-package.git # 🎯 Dedicated Package Repo (this repo)
# Work on statekit
cd devops/devpages/packages/devpages-statekit/
# make changes, test, commit to devops repo
# Work on debug tools
cd devops/devpages/packages/devpages-debug/
# make changes, test, commit to devops repo# Navigate to publishing area
cd devops/devpages/published/devpages/
# Copy updated modules from packages/
cp -r ../../packages/devpages-statekit/src/* src/statekit/
cp -r ../../packages/devpages-debug/src/* src/debug/
# Build unified package
npm run build
# Test the unified package
npm test # if you have tests# Commit changes in devops repo
git add .
git commit -m "Update devpages package v1.0.x"
# Push to dedicated package repo using subtree
git subtree push --prefix=devpages/published/devpages package-repo main
# Tag the release
git tag v1.0.x
git push package-repo v1.0.x# In your devops repository
cd devops/
# Add the package repo as a remote
git remote add package-repo git@github.com:study-groups/devpages-package.git
# Initial push of the unified package
git subtree push --prefix=devpages/published/devpages package-repo main# After making changes to devpages/published/devpages/
git add devpages/published/devpages/
git commit -m "feat: Update devpages package v1.0.x
- Updated statekit with new features
- Enhanced debug panel performance
- Fixed TypeScript definitions"
# Push to package repo
git subtree push --prefix=devpages/published/devpages package-repo main
# Create release tag
git tag v1.0.x -m "Release v1.0.x"
git push package-repo v1.0.xUsers can now install your package cleanly:
# Latest version
npm install git+https://github.com/study-groups/devpages-package.git
# Specific version
npm install git+https://github.com/study-groups/devpages-package.git#v1.0.1
# In package.json
{
"dependencies": {
"devpages": "git+https://github.com/study-groups/devpages-package.git#v1.0.1"
}
}You can set up GitHub Actions to automate this:
# .github/workflows/publish-package.yml
name: Publish DevPages Package
on:
push:
paths:
- 'devpages/published/devpages/**'
branches:
- main
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Push to package repo
run: |
git remote add package-repo git@github.com:study-groups/devpages-package.git
git subtree push --prefix=devpages/published/devpages package-repo main- Major (1.0.0 → 2.0.0): Breaking changes
- Minor (1.0.0 → 1.1.0): New features
- Patch (1.0.0 → 1.0.1): Bug fixes
- Update version in
package.json - Update
CHANGELOG.md - Commit and push to devops
- Subtree push to package repo
- Create git tag
- Create GitHub release (optional)
- ✅ Clean user experience: Simple GitHub installation
- ✅ Smaller downloads: Only package files, not entire devops repo
- ✅ Focused documentation: Package-specific README
- ✅ Separate issue tracking: Package issues separate from devops
- ✅ Better versioning: Clean release history
- ✅ Development flexibility: Work on modules independently