This document describes the release process for LogGuardian.
- AWS CLI configured with access to both dev and prod accounts
- Go 1.24+ installed
- SAM CLI installed
- Push access to the repository
- Main branch must be up to date
Important: We use a release branch workflow. Never push directly to main. All releases go through a PR.
Start from an up-to-date main branch:
git checkout main
git pull origin main
git checkout -b release/X.Y.Z # Example: release/1.2.0 (no 'v' prefix)Note: Branch naming convention is release/X.Y.Z without 'v' prefix
Use the helper script to update the version:
./scripts/update-version.sh X.Y.ZOr manually:
echo "X.Y.Z" > VERSION
sed -i 's/SemanticVersion: .*/SemanticVersion: X.Y.Z/' template.yamlmake clean
make build
make test
make packagegit add -A
git commit -m "chore: Release version X.Y.Z
Brief description of changes"# Push the release branch
git push origin release/X.Y.ZGitHub Actions will automatically:
- Detect the
release/*branch - Run
scripts/01_release_docs_generator.sh - Generate/update CHANGELOG.md and RELEASE_NOTES.md
- Commit and push these changes back to your release branch
You MUST wait for this workflow to complete before proceeding!
Check workflow status:
- Navigate to GitHub repository in browser
- Click "Actions" tab
- Look for "Auto-Generate Release Documentation" workflow
- Wait for it to complete (green checkmark)
CRITICAL: Pull the auto-generated changes:
# Pull the automated commits
git pull origin release/X.Y.Z
# Review the generated documentation
cat CHANGELOG.md | head -50
cat RELEASE_NOTES.md
# Verify VERSION was updated correctly
cat VERSIONIf you need to make manual edits to the release notes:
# Edit release notes
vim RELEASE_NOTES.md
# Commit and push your changes
git add RELEASE_NOTES.md
git commit -m "docs: Finalize release notes for X.Y.Z"
git push origin release/X.Y.ZNOW you can create the tag. While still on the release branch:
# Still on release/X.Y.Z branch
# Create and push tag (semantic versioning format X.Y.Z)
git tag -a X.Y.Z -m "Release version X.Y.Z
- List major changes
- Include any breaking changes
- Reference issues fixed"
git push origin X.Y.ZIMPORTANT:
- Tags use pure semantic versioning format (e.g.,
1.2.0, no "v" prefix) - The tag push automatically triggers GitHub Actions to create a release with artifacts
- Tag is created from the release branch, NOT from main
From the release branch, first deploy to dev for testing, then to prod:
# Still on release/X.Y.Z branch
# First authenticate to dev account and deploy for testing
# Set your AWS credentials for the dev account
make publish
# Test the application in dev account
# Verify functionality and configuration
# If all tests pass, authenticate to prod account where public SAR is located
# Set your AWS credentials for the prod account
make publishAfter the release is complete (tag pushed, SAR published), create a Pull Request to main:
Using GitHub Web UI:
- Navigate to your repository on github.com
- Click "Pull requests" tab
- Click "New pull request"
- Set base:
main, compare:release/X.Y.Z - Click "Create pull request"
- Title:
Release X.Y.Z - Body:
## Summary
- Release X.Y.Z completed
- Tag already created and pushed
- SAR application already published
- GitHub Actions release pipeline completed
## Changes
- List of major changes
- Any breaking changes
- Referenced issues
## Release Artifacts
- GitHub Release: Created via automated pipeline
- SAR Application: Published to production
- Click "Create pull request"
After review and approval:
- Merge the PR to main (via GitHub UI or CLI)
- Note: Keep the release branch for historical reference (do NOT delete)
- This merge brings the version changes to main for consistency
- Check GitHub Actions for successful release pipeline
- Verify GitHub release was created with artifacts
- Confirm SAR application is updated in AWS Console
- Verify release branch remains for historical reference
- Release branches:
release/X.Y.Z - Example:
release/1.2.0
- Tags:
X.Y.Z(pure semantic versioning) - Example:
1.2.0 - Tags matching pattern
[0-9]+.[0-9]+.[0-9]+trigger the release pipeline
We follow semantic versioning (MAJOR.MINOR.PATCH):
- MAJOR: Breaking changes
- MINOR: New features, backwards compatible
- PATCH: Bug fixes, backwards compatible
For a standard release (example with version 1.2.0):
# 1. Create release branch from main
git checkout main && git pull origin main
git checkout -b release/1.2.0
# 2. Update version and test
./scripts/update-version.sh 1.2.0
make clean build test package
# 3. Commit and push release branch
git add -A
git commit -m "chore: Release version 1.2.0"
git push origin release/1.2.0
# 4. ⚠️ CRITICAL: Wait for automated documentation generation
# Check GitHub Actions tab in browser:
# https://github.com/your-org/logguardian/actions
# 5. Pull auto-generated CHANGELOG.md and RELEASE_NOTES.md
git pull origin release/1.2.0
# 6. Review generated documentation
cat CHANGELOG.md | head -50
cat RELEASE_NOTES.md
# 7. (Optional) Make manual edits to release notes
vim RELEASE_NOTES.md
git add RELEASE_NOTES.md
git commit -m "docs: Finalize release notes"
git push origin release/1.2.0
# 8. Create and push tag from release branch (semantic versioning)
# Still on release/1.2.0 branch
git tag -a 1.2.0 -m "Release version 1.2.0"
git push origin 1.2.0 # This triggers the release pipeline
# 9. Publish to SAR from release branch
# First authenticate to dev account and test
make publish
# Verify in dev account, then authenticate to prod account
make publish
# 10. Create PR to main (after release is complete)
# Use GitHub UI: github.com -> Pull requests -> New pull request
# base: main, compare: release/1.2.0
# 11. Wait for review and merge to main (via GitHub UI)
# Note: Release branches are kept for historical reference - do NOT deleteIf a release needs to be rolled back:
- Delete the tag locally and remotely:
git tag -d X.Y.Z
git push origin :refs/tags/X.Y.Z- Fix the issues
- Create a new patch version
- Follow the normal release process
- The VERSION file is the single source of truth for versioning
- VERSION file format: X.Y.Z (pure semantic versioning, no "v" prefix)
- Git tags use same format:
1.4.2(notv1.4.2) - Consistent across all systems: Git, Docker, AWS SAR, Makefiles
- No conversion or transformation needed
- Git tags use same format:
- Never use default/fallback versions - VERSION file is required
- All version references in Makefiles read directly from VERSION file
- Documentation uses generic "latest" references to avoid updates
- Release branches (
release/*) are kept permanently for audit trail - Each release has a corresponding branch showing exactly what was released
Historical Note: Prior to v1.4.2, tags used "v" prefix (v1.4.0, v1.4.1). Starting from 1.4.2, we adopted pure semantic versioning (X.Y.Z) to align with Docker/OCI and AWS SAR standards.