release process
This document describes how to publish production releases of PromptKit tools (arena and packc) that can be installed via go install.
Prerequisites
Section titled “Prerequisites”Before starting a release:
- All tests passing on main branch
- Documentation is up to date
- CHANGELOG is updated (if exists)
- You have tested the release process (see testing-releases-quickstart.md)
- You understand Go proxy caching (versions are permanent!)
Understanding Monorepo Releases
Section titled “Understanding Monorepo Releases”PromptKit uses a monorepo structure with internal dependencies:
tools/arena → depends on → runtime, pkgtools/packc → depends on → runtime, pkgKey Principle: Dependencies must be tagged and published before the tools that depend on them.
Release Order
Section titled “Release Order”- Dependencies First:
runtimeandpkgmodules - Wait for Go Proxy: 5-10 minutes for caching
- Tools Second:
arenaandpackcCLI tools
Semantic Versioning
Section titled “Semantic Versioning”Use semantic versioning (semver) for all releases:
- Major (v1.0.0): Breaking changes
- Minor (v1.1.0): New features, backward compatible
- Patch (v1.0.1): Bug fixes, backward compatible
Important: All modules should use the same version number for consistency.
Step-by-Step Release Process
Section titled “Step-by-Step Release Process”Phase 1: Prepare the Release
Section titled “Phase 1: Prepare the Release”1. Update Version Numbers
Section titled “1. Update Version Numbers”# Create release preparation branchgit checkout maingit pull origin maingit checkout -b release/v1.0.0
# Update version in code (if applicable)# - Update version constants# - Update documentation# - Update examples2. Update Documentation
Section titled “2. Update Documentation”# Update CHANGELOG.md (create if doesn't exist)cat >> CHANGELOG.md << EOF
## [1.0.0] - $(date +%Y-%m-%d)
### Added- List new features
### Changed- List changes
### Fixed- List bug fixesEOF
# Commit changesgit add CHANGELOG.mdgit commit -m "docs: prepare for v1.0.0 release"git push origin release/v1.0.03. Create and Merge PR
Section titled “3. Create and Merge PR”# Create PRgh pr create --title "Release v1.0.0" --body "Release preparation for v1.0.0"
# Get approval and merge# Wait for CI to passgh pr merge --squashPhase 2: Tag Dependencies
Section titled “Phase 2: Tag Dependencies”1. Ensure Main is Up to Date
Section titled “1. Ensure Main is Up to Date”git checkout maingit pull origin main2. Tag Runtime Module
Section titled “2. Tag Runtime Module”# Tag runtimegit tag runtime/v1.0.0 -m "Release runtime v1.0.0"git push origin runtime/v1.0.0
# Verify taggit tag -l "runtime/*"3. Tag Pkg Module
Section titled “3. Tag Pkg Module”# Tag pkggit tag pkg/v1.0.0 -m "Release pkg v1.0.0"git push origin pkg/v1.0.0
# Verify taggit tag -l "pkg/*"4. Verify Dependencies are Published
Section titled “4. Verify Dependencies are Published”# Wait 5-10 minutes, then check Go proxycurl https://proxy.golang.org/github.com/!altaira!labs/!prompt!kit/runtime/@v/v1.0.0.info
curl https://proxy.golang.org/github.com/!altaira!labs/!prompt!kit/pkg/@v/v1.0.0.infoPhase 3: Update Tool Dependencies
Section titled “Phase 3: Update Tool Dependencies”1. Create Tool Release Branch
Section titled “1. Create Tool Release Branch”# Create new branch for tool releasegit checkout -b release/tools/arena/v1.0.02. Update Arena go.mod
Section titled “2. Update Arena go.mod”cd tools/arena
# Set explicit version requirements BEFORE dropping replacego mod edit -require="github.com/AltairaLabs/PromptKit/runtime@v1.0.0"go mod edit -require="github.com/AltairaLabs/PromptKit/pkg@v1.0.0"
# Now remove replace directivesgo mod edit -dropreplace=github.com/AltairaLabs/PromptKit/runtimego mod edit -dropreplace=github.com/AltairaLabs/PromptKit/pkg
# Download and clean up dependenciesgo mod downloadgo mod tidy
# Verify build worksgo build -v ./...
cd ../..3. Update Packc go.mod (Same Process)
Section titled “3. Update Packc go.mod (Same Process)”cd tools/packc
# Set explicit version requirements BEFORE dropping replacego mod edit -require="github.com/AltairaLabs/PromptKit/runtime@v1.0.0"go mod edit -require="github.com/AltairaLabs/PromptKit/pkg@v1.0.0"
# Now remove replace directivesgo mod edit -dropreplace=github.com/AltairaLabs/PromptKit/runtimego mod edit -dropreplace=github.com/AltairaLabs/PromptKit/pkg
# Download and clean up dependenciesgo mod downloadgo mod tidy
# Verify build worksgo build -v ./...
cd ../..4. Commit Tool Changes
Section titled “4. Commit Tool Changes”# Add modified go.mod and go.sum filesgit add tools/arena/go.mod tools/arena/go.sumgit add tools/packc/go.mod tools/packc/go.sum
# Commitgit commit -m "release: update tools to runtime and pkg v1.0.0"
# Push release branchgit push origin release/tools/arena/v1.0.0Phase 4: Tag and Publish Tools
Section titled “Phase 4: Tag and Publish Tools”1. Tag Arena
Section titled “1. Tag Arena”# Tag arena toolgit tag tools/arena/v1.0.0 -m "Release arena v1.0.0"git push origin tools/arena/v1.0.0
# Verify taggit tag -l "tools/arena/*"2. Tag Packc
Section titled “2. Tag Packc”# Tag packc toolgit tag tools/packc/v1.0.0 -m "Release packc v1.0.0"git push origin tools/packc/v1.0.0
# Verify taggit tag -l "tools/packc/*"Phase 5: Verify Release
Section titled “Phase 5: Verify Release”1. Wait for Go Proxy
Section titled “1. Wait for Go Proxy”Wait 5-10 minutes for Go proxy to cache the new versions.
2. Test Installation
Section titled “2. Test Installation”# Test arena installationgo install github.com/AltairaLabs/PromptKit/tools/arena/cmd/promptarena@v1.0.0
# Test packc installationgo install github.com/AltairaLabs/PromptKit/tools/packc@v1.0.0
# Verify versionspromptarena --versionpackc --version3. Test Functionality
Section titled “3. Test Functionality”# Run quick smoke testscd examples/customer-supportpromptarena run
# Test packccd examples/customer-supportpackc buildPhase 6: Restore Development Setup
Section titled “Phase 6: Restore Development Setup”1. Restore Replace Directives on Main
Section titled “1. Restore Replace Directives on Main”# Checkout maingit checkout main
# Ensure replace directives are still present for developmentcat tools/arena/go.mod | grep "replace"
# If missing, restore themcd tools/arenago mod edit -replace=github.com/AltairaLabs/PromptKit/runtime=../../runtimego mod edit -replace=github.com/AltairaLabs/PromptKit/pkg=../../pkggo mod tidy
cd ../packcgo mod edit -replace=github.com/AltairaLabs/PromptKit/runtime=../../runtimego mod edit -replace=github.com/AltairaLabs/PromptKit/pkg=../../pkggo mod tidy
cd ../..
# Commit if neededgit add tools/*/go.mod tools/*/go.sumgit commit -m "chore: restore replace directives for development"git push origin mainPhase 7: Create GitHub Release
Section titled “Phase 7: Create GitHub Release”1. Create Release Notes
Section titled “1. Create Release Notes”# Create GitHub release with notesgh release create v1.0.0 \ --title "PromptKit v1.0.0" \ --notes "$(cat << EOF# PromptKit v1.0.0
## Installation
\`\`\`bash# Install Arenago install github.com/AltairaLabs/PromptKit/tools/arena/cmd/promptarena@v1.0.0
# Install PackCgo install github.com/AltairaLabs/PromptKit/tools/packc@v1.0.0\`\`\`
## What's Changed
- Feature 1- Feature 2- Bug fix 1
## Full Changelog
See [CHANGELOG.md](./CHANGELOG.md)EOF)"2. Attach Binaries (Optional)
Section titled “2. Attach Binaries (Optional)”# Build binaries for multiple platformsmake build-tools
# Attach to releasegh release upload v1.0.0 bin/*Phase 8: Announce Release
Section titled “Phase 8: Announce Release”- Update README.md with new version
- Post to GitHub Discussions
- Update documentation site
- Announce on social media (if applicable)
Quick Reference Commands
Section titled “Quick Reference Commands”# Complete release flowVERSION=v1.0.0
# 1. Tag dependenciesgit tag runtime/$VERSION -m "Release runtime $VERSION"git tag pkg/$VERSION -m "Release pkg $VERSION"git push origin runtime/$VERSION pkg/$VERSION
# 2. Wait 10 minutes
# 3. Update tool dependenciescd tools/arenago mod edit -require="github.com/AltairaLabs/PromptKit/runtime@$VERSION"go mod edit -require="github.com/AltairaLabs/PromptKit/pkg@$VERSION"go mod edit -dropreplace=github.com/AltairaLabs/PromptKit/runtimego mod edit -dropreplace=github.com/AltairaLabs/PromptKit/pkggo mod downloadgo mod tidy
cd ../packcgo mod edit -require="github.com/AltairaLabs/PromptKit/runtime@$VERSION"go mod edit -require="github.com/AltairaLabs/PromptKit/pkg@$VERSION"go mod edit -dropreplace=github.com/AltairaLabs/PromptKit/runtimego mod edit -dropreplace=github.com/AltairaLabs/PromptKit/pkggo mod downloadgo mod tidy
cd ../..
# 4. Commit and tag toolsgit checkout -b release/tools/$VERSIONgit add tools/*/go.mod tools/*/go.sumgit commit -m "release: update tools to $VERSION"git push origin release/tools/$VERSION
git tag tools/arena/$VERSION -m "Release arena $VERSION"git tag tools/packc/$VERSION -m "Release packc $VERSION"git push origin tools/arena/$VERSION tools/packc/$VERSION
# 5. Wait 10 minutes and testgo install github.com/AltairaLabs/PromptKit/tools/arena/cmd/promptarena@$VERSIONgo install github.com/AltairaLabs/PromptKit/tools/packc@$VERSIONTroubleshooting
Section titled “Troubleshooting””Package not found” Error
Section titled “”Package not found” Error”Problem: go install fails with package not found.
Solution:
- Verify tags exist:
git tag -l - Wait longer for Go proxy (up to 10 minutes)
- Check proxy manually:
curl https://proxy.golang.org/...
Build Fails After Removing Replace Directives
Section titled “Build Fails After Removing Replace Directives”Problem: go build fails after removing replace directives.
Solution:
- Ensure dependencies are tagged first
- Wait for Go proxy to cache
- Try:
go clean -modcache && go build
Wrong Version Installed
Section titled “Wrong Version Installed”Problem: go install installs old version.
Solution:
# Clear module cachego clean -modcache
# Force specific versiongo install github.com/AltairaLabs/PromptKit/tools/arena/cmd/promptarena@v1.0.0Need to Fix a Bad Release
Section titled “Need to Fix a Bad Release”Problem: Released wrong version or buggy version.
Solution:
- DO NOT delete tags - Go proxy has cached them
- Create patch release: v1.0.1 with fixes
- Communicate: Update release notes, mark old version as deprecated
Rollback Procedure
Section titled “Rollback Procedure”If a release has critical issues:
# 1. Create hotfix branchgit checkout -b hotfix/v1.0.1
# 2. Apply fixes# ... make changes ...
# 3. Follow normal release process with patch version# Tag: v1.0.1
# 4. Update GitHub release to mark v1.0.0 as deprecatedgh release edit v1.0.0 --notes "⚠️ Deprecated: Use v1.0.1 instead"Automation (Future)
Section titled “Automation (Future)”Consider automating this process with:
- GitHub Actions workflow triggered by version tags
- Automated changelog generation
- Automated binary building and uploading
- Automated announcement posting
See docs/devops/release-automation.md (to be created) for future automation plans.
Checklist Template
Section titled “Checklist Template”Copy this for each release:
## Release vX.Y.Z Checklist
### Pre-Release- [ ] All tests passing- [ ] Documentation updated- [ ] CHANGELOG updated- [ ] Tested release process in test repo
### Dependencies- [ ] Tagged runtime/vX.Y.Z- [ ] Tagged pkg/vX.Y.Z- [ ] Verified on Go proxy (waited 10 min)
### Tools- [ ] Updated arena go.mod- [ ] Updated packc go.mod- [ ] Built successfully- [ ] Tagged tools/arena/vX.Y.Z- [ ] Tagged tools/packc/vX.Y.Z
### Verification- [ ] Installed via go install- [ ] Tested arena functionality- [ ] Tested packc functionality
### Post-Release- [ ] Restored replace directives on main- [ ] Created GitHub release- [ ] Announced release- [ ] Updated documentation site
### Cleanup- [ ] Deleted release branches- [ ] Verified all tags pushed- [ ] Updated README install instructionsRelated Documentation
Section titled “Related Documentation”- Testing Releases - How to test safely first
- CI/CD Pipelines - Automated workflows
- Release Test Workflow - Test automation
Support
Section titled “Support”For release issues:
- Check troubleshooting section above
- Review testing releases guide
- Create GitHub issue with
releaselabel - Contact @maintainers for urgent issues
Last Updated: 2 November 2025