Streamlined release process for LogGuardian with automated changelog generation, Docker image publishing, and AWS SAR deployment.
- Major Release (1.0.0): Breaking changes or major features
- Minor Release (0.2.0): New features, backwards compatible
- Patch Release (0.1.1): Bug fixes and minor improvements
# Ensure you're on the latest main
git checkout main
git pull origin main
# Create release branch
git checkout -b release/<version>
git push -u origin release/<version>- GitHub Actions automatically detects
release/*branch creation - Runs
scripts/01_release_docs_generator.shto:- Generate CHANGELOG.md from commit history
- Create RELEASE_NOTES.md with installation instructions
- Update VERSION file
- Update version strings in source files
- Wait for workflow completion before proceeding!
- Check Actions tab: "Auto-Generate Release Documentation" workflow
# Pull the auto-generated documentation
git pull origin release/<version>
# Review generated files
cat CHANGELOG.md | head -50
cat RELEASE_NOTES.md
cat VERSION
# Verify version updates in code
grep "version" cmd/lambda/main.go cmd/container/main.go# Edit release notes if needed
vim RELEASE_NOTES.md
# Commit any manual changes
git add .
git commit -m "docs: Finalize release notes for <version>"
git push origin release/<version># Create and push tag - triggers release workflows
git tag -a <version> -m "Release <version>"
git push origin <version>This triggers:
- Lambda function build and packaging
- Docker image build and push to ghcr.io
- AWS SAR application update
- GitHub Release creation with artifacts
Wait for all workflows to complete, then verify:
# Check Docker image
docker pull ghcr.io/zsoftly/logguardian:<version>
docker run --rm ghcr.io/zsoftly/logguardian:<version> --help
# Check GitHub Release (in browser)
# Visit: https://github.com/zsoftly/logguardian/releases/tag/<version>
# Check AWS SAR (if applicable)
aws serverlessrepo get-application \
--application-id arn:aws:serverlessrepo:ca-central-1:410129828371:applications/LogGuardian \
--region ca-central-1# After successful release
git checkout main
git merge --no-ff release/<version>
git push origin main
# Delete release branch
git push origin --delete release/<version>
git branch -d release/<version>Published automatically with tags:
ghcr.io/zsoftly/logguardian:latest(main branch)ghcr.io/zsoftly/logguardian:<version>(release tag)ghcr.io/zsoftly/logguardian:<major>(e.g., 1)ghcr.io/zsoftly/logguardian:<major>.<minor>(e.g., 1.2)
logguardian-compliance.zipattached to GitHub Release- Contains compiled Lambda binary
logguardian-containerbinary attached to GitHub Release- Standalone container executable
- All tests passing:
make test - Security scan clean:
make security-scan - Linting passed:
golangci-lint run - Documentation updated
- CLAUDE.md updated with any new patterns
- Create release branch:
git checkout -b release/<version> - Push branch:
git push -u origin release/<version> - Wait for auto-generation workflow
- Pull changes:
git pull origin release/<version> - Review CHANGELOG.md and RELEASE_NOTES.md
- Create tag:
git tag -a <version> -m "Release <version>" - Push tag:
git push origin <version> - Wait for release workflows to complete
- Verify Docker image:
docker pull ghcr.io/zsoftly/logguardian:<version> - Verify GitHub Release artifacts
- Merge to main:
git checkout main && git merge --no-ff release/<version> - Push main:
git push origin main - Delete release branch:
git push origin --delete release/<version>
- Announce release in discussions/social media
- Update any dependent projects
- Monitor for issues
For critical issues that can't wait:
# Create hotfix from last release
git checkout <last-version>
git checkout -b hotfix/<hotfix-version>
# Apply minimal fix
# ... make changes ...
git commit -m "fix: Critical issue description"
# Create hotfix tag
git tag -a <hotfix-version> -m "Hotfix <hotfix-version>"
git push origin <hotfix-version>
# After release, merge to main
git checkout main
git merge --no-ff hotfix/<hotfix-version>
git push origin mainFollow Semantic Versioning (SemVer):
- MAJOR.MINOR.PATCH (e.g., 1.2.3)
- Increment MAJOR for breaking changes
- Increment MINOR for new features (backwards compatible)
- Increment PATCH for bug fixes
# Check workflow logs in browser
# Visit: https://github.com/zsoftly/logguardian/actions
# Test locally
make build
make test
make docker-build# Verify GitHub Container Registry access
echo $GITHUB_TOKEN | docker login ghcr.io -u USERNAME --password-stdin
# Build and test locally
docker build -t test-build .
docker run --rm test-build --help# Verify SAR application
aws serverlessrepo get-application \
--application-id arn:aws:serverlessrepo:ca-central-1:410129828371:applications/LogGuardian \
--region ca-central-1
# Test SAM template locally
sam validate
sam build
sam local start-lambdaIf issues are discovered post-release:
# Revert Docker latest tag to previous version
docker pull ghcr.io/zsoftly/logguardian:<previous-version>
docker tag ghcr.io/zsoftly/logguardian:<previous-version> ghcr.io/zsoftly/logguardian:latest
docker push ghcr.io/zsoftly/logguardian:latest
# Update GitHub Release notes (in browser)
# Visit: https://github.com/zsoftly/logguardian/releases/tag/<version>
# Click "Edit release"
# Update notes: "⚠️ This release has been superseded. Please use <previous-version>"
# Fix issues and create new patch release## LogGuardian <version>
### 🎉 Highlights
- Major feature or improvement
- Performance enhancement
- Security update
### 🐛 Bug Fixes
- Fixed issue #123
- Resolved problem with X
### 📦 Installation
```bash
# Docker
docker pull ghcr.io/zsoftly/logguardian:<version>
# Lambda
Download from GitHub Release artifactsSee updated docs at docs/
Thanks to all contributors!
## Automation Scripts Location
- `.github/workflows/release.yml` - Main release workflow (builds Lambda, Container, publishes Docker, creates GitHub Release)
- `.github/workflows/generate-docs.yml` - Auto-generates documentation when release branch is created
- `.github/workflows/ci.yml` - CI pipeline (tests, linting, security, Docker build testing)
- `scripts/01_release_docs_generator.sh` - Generates CHANGELOG.md, RELEASE_NOTES.md, and updates versions