Commit, Push, and Release Workflow for PWA
Automate the complete release workflow for the SOTA Peak Finder PWA. This skill handles version bumping, committing, pushing, and creating GitHub releases with proper release notes.
Usage
Invoke this skill with a version bump type:
- •
/commit-push-release patch- Bug fixes and minor updates (3.2.2 → 3.2.3) - •
/commit-push-release minor- New features (3.2.2 → 3.3.0) - •
/commit-push-release major- Breaking changes (3.2.2 → 4.0.0)
Workflow Steps
Step 1: Pre-flight Checks
- •Check current branch:
git branch --show-current - •Verify we're on
mainbranch - •Check git status:
git status - •Review all changes to be committed
Step 2: Bump Version
- •Update
package.jsonversion based on$ARGUMENTS(patch/minor/major) - •If
$ARGUMENTSis:- •
patch: Increment patch version (x.x.X) - •
minor: Increment minor version (x.X.0) - •
major: Increment major version (X.0.0)
- •
- •Read the new version from package.json
Step 3: Generate Release Notes
- •Get commit history since last version:
git log --oneline --pretty=format:"%s" $(git describe --tags --abbrev=0 2>/dev/null || git rev-list --max-parents=0 HEAD)..HEAD - •Categorize commits by conventional commit type:
- •
feat:→ Features - •
fix:→ Bug Fixes - •
refactor:→ Code Improvements - •
docs:→ Documentation - •
chore:→ Maintenance
- •
- •Format release notes in markdown with sections
Step 4: Commit Changes
- •Stage all modified files:
git add -A - •Create commit with message format:
code
chore: bump version to vX.Y.Z Release notes will be added to GitHub release Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- •Verify commit was successful:
git log -1 --oneline
Step 5: Create Git Tag
- •Create annotated tag:
git tag -a vX.Y.Z -m "Release vX.Y.Z" - •Verify tag created:
git tag -l "v*" | tail -1
Step 6: Push to GitHub
- •Push commits:
git push origin main - •Push tags:
git push origin --tags - •Verify push was successful
Step 7: Create GitHub Release
- •Use GitHub CLI to create release:
bash
gh release create vX.Y.Z \ --title "Release vX.Y.Z" \ --notes "<generated_release_notes>"
- •Display release URL to user
- •Confirm release is visible on GitHub
Important Notes
- •PWA Update: The version bump triggers service worker update, users will see the new version on next visit
- •Conventional Commits: Use standard commit prefixes (feat:, fix:, chore:, etc.)
- •Release Notes: Should be user-friendly, not developer-focused
- •Always on main: Only release from the main branch
- •GitHub CLI Required: Ensure
ghis authenticated:gh auth status
Error Handling
If any step fails:
- •Stop the workflow - don't proceed to next steps
- •Show the error to the user
- •Explain what went wrong and how to fix it
- •Ask the user if they want to retry or abort
Example Release Notes Format
markdown
## 🎉 What's New - Add donation support with Buy Me a Coffee and GitHub Sponsors - Add GitHub Discussions link for community support ## 🔧 Improvements - Update footer design with new support section - Improve README with contribution guidelines ## 📝 Documentation - Add support badges to README - Update contributing section --- **Full Changelog**: https://github.com/matsubo/sota-peak-finder/compare/vOLD...vNEW
After Release
The PWA will automatically update for users due to:
- •GitHub Actions deployment triggered by push to main
- •Service worker will detect new version
- •Users will be prompted to reload on next visit
Safety Checks
Before proceeding:
- •✅ Check if there are uncommitted changes
- •✅ Verify we're on the correct branch (main)
- •✅ Confirm all tests pass (if applicable)
- •✅ Ensure package.json exists and is valid JSON
- •✅ Verify GitHub CLI is authenticated
DO NOT proceed if any safety checks fail!