Repository navigation
Auto Release Workflow
Automated versioning and release creation on every merge to main.
- Code is merged to
mainbranch - GitHub Actions workflow triggers
- Gets latest git tag (defaults to
v0.0.0if none) - Auto-increments patch version
- Creates new git tag
- Generates release notes from commits
- Creates GitHub Release
Uses Semantic Versioning: MAJOR.MINOR.PATCH
Every merge to main auto-increments patch:
-
v1.0.0→v1.0.1 -
v1.0.1→v1.0.2 -
v1.0.2→v1.0.3
Use the bump script for bigger changes:
# Bump minor version (1.0.5 → 1.1.0)
./scripts/bump-version.sh minor
# Bump major version (1.2.5 → 2.0.0)
./scripts/bump-version.sh major- Patch (automatic): Bug fixes, small changes
- Minor (manual): New features, backward-compatible
- Major (manual): Breaking changes
Just merge code to main. Auto-release creates v0.0.1.
Create initial tag manually:
git tag -a v1.0.0 -m "Initial release"
git push origin v1.0.0Next merge will create v1.0.1.
- Go to: Settings → Actions → General
- Scroll to "Workflow permissions"
- Select "Read and write permissions"
- Click Save
This allows the workflow to create tags and releases.
Release notes are auto-generated from commit messages between tags.
Example:
## What's Changed
- feat: add user authentication
- fix: resolve login bug
- docs: update README
Full Changelog: v1.0.0...v1.0.1
Tip: Use clear commit messages for better release notes.
# Show current version and bump patch
./scripts/bump-version.sh
# Bump minor version
./scripts/bump-version.sh minor
# Bump major version
./scripts/bump-version.sh major- Gets latest tag
- Increments version based on type
- Asks for confirmation
- Creates and pushes new tag
- Auto-release workflow creates the release
- Check GitHub Actions is enabled
- Check "Read and write permissions" is set
- Look at Actions tab for errors
First merge creates v0.0.1. If you want v1.0.0, create it manually first.
If you push directly to main multiple times rapidly, each push creates a tag. Use PRs to batch changes.
# Work on feature branch
git checkout -b feature/new-feature
# ... make changes ...
git commit -m "feat: add new feature"
git push origin feature/new-feature
# Create PR and merge to main
# → Auto-release creates v1.0.1
# Need minor version bump?
git checkout main
git pull
./scripts/bump-version.sh minor
# → Creates v1.1.0
# Continue development...Maintained by @ThanuMahee12
Home | Getting Started | Understanding Git Files | Auto Release Workflow