testing releases
This guide shows you how to safely test the monorepo release process before doing it for real.
Quick Start - Test Locally (Safest)
Section titled “Quick Start - Test Locally (Safest)”# Run the dry-run script - doesn't modify any files./scripts/test-release.sh arena v0.0.1-test
# Or test packc./scripts/test-release.sh packc v0.0.1-testThis script will:
- ✅ Show you what would change
- ✅ Test building with modified go.mod
- ✅ Restore everything to original state
- ❌ NOT create any tags or commits
Testing Strategies (Choose One)
Section titled “Testing Strategies (Choose One)”Strategy 1: Local Script (Recommended)
Section titled “Strategy 1: Local Script (Recommended)”Best for: Testing the release process safely without side effects
# Test locally without any git operations./scripts/test-release.sh arena v0.0.1-test
# Or test packc./scripts/test-release.sh packc v0.0.1-testPros:
- ✅ Zero risk - no file modifications
- ✅ Instant feedback
- ✅ No cleanup needed
- ✅ Tests the same build process as production
Cons:
- ❌ Doesn’t test actual go install from Go proxy
- ❌ Doesn’t test Go proxy caching behavior
Recommendation: Use this first. It tests 95% of the release process with zero risk.
Strategy 2: Test Tags in Main Repo (Use With Caution)
Section titled “Strategy 2: Test Tags in Main Repo (Use With Caution)”Best for: Testing the actual Go proxy behavior with real tags
⚠️ WARNING: Tags are cached by Go proxy after 5-10 minutes and stuck for 24 hours minimum. Only use if you’re confident and can delete quickly!
# Use '-test' suffix - can be deleted if you're FAST (< 5 minutes)# The -test suffix is a valid pre-release identifier per semantic versioning# See: https://semver.org/#spec-item-9git tag runtime/v0.0.1-testgit tag pkg/v0.0.1-testgit tag sdk/v0.0.1-testgit tag tools/arena/v0.0.1-testgit tag tools/packc/v0.0.1-testgit push origin runtime/v0.0.1-test pkg/v0.0.1-test sdk/v0.0.1-test tools/arena/v0.0.1-test tools/packc/v0.0.1-test
# Wait 2-3 minutes, then testmkdir -p /tmp/test-sdk && cd /tmp/test-sdkgo mod init example.com/testgo get github.com/AltairaLabs/PromptKit/sdk@v0.0.1-testcd -
go install github.com/AltairaLabs/PromptKit/tools/arena/cmd/promptarena@v0.0.1-testgo install github.com/AltairaLabs/PromptKit/tools/packc@v0.0.1-test
# If successful, DELETE IMMEDIATELY (within 5 min)git push origin --delete runtime/v0.0.1-test pkg/v0.0.1-test sdk/v0.0.1-test tools/arena/v0.0.1-test tools/packc/v0.0.1-testgit tag -d runtime/v0.0.1-test pkg/v0.0.1-test sdk/v0.0.1-test tools/arena/v0.0.1-test tools/packc/v0.0.1-testPros:
- ✅ Tests in real repo
- ✅ Tests actual
go installandgo get - ✅ Tests Go proxy behavior
- ✅ Deletable if quick (< 5 min)
Cons:
- ⚠️ DANGEROUS: Cached by Go proxy after 5-10 minutes
- ⚠️ RISKY: Must delete quickly or stuck for 24h
- ⚠️ NOT RECOMMENDED: Easy to forget and pollute history
Recommendation: Skip this unless you absolutely need to test Go proxy caching. Use Strategy 1 instead.
Strategy 3: GitHub Actions Testing
Section titled “Strategy 3: GitHub Actions Testing”Best for: Testing automation and CI/CD workflows
# 1. Create a release test branchgit checkout -b release-test/arena-v0.0.1
# 2. Push to trigger the workflowgit push origin release-test/arena-v0.0.1
# 3. Check GitHub Actions tab for results
# 4. Delete branch when donegit push origin --delete release-test/arena-v0.0.1git branch -d release-test/arena-v0.0.1Pros:
- ✅ Tests GitHub Actions workflow
- ✅ No tags created
- ✅ Branches are deletable anytime
- ✅ Can iterate quickly
Cons:
- ❌ Doesn’t test actual
go install - ❌ Doesn’t test Go proxy
Recommendation: Use after Strategy 1 to test CI/CD automation.
Recommended Testing Flow
Section titled “Recommended Testing Flow”Before First Release
Section titled “Before First Release”# Day 1: Test locally (5 minutes)./scripts/test-release.sh arena v0.0.1-test
# Day 2: Test GitHub Actions (10 minutes)git checkout -b release-test/arena-v0.0.1git push origin release-test/arena-v0.0.1# Check workflow, then delete branch
# Day 3: Do real release./scripts/release.sh v1.0.0That’s it. Don’t overcomplicate it with test repos or risky tag testing.
Common Pitfalls to Avoid
Section titled “Common Pitfalls to Avoid”❌ DON’T: Push test tags without ‘-test’ suffix
Section titled “❌ DON’T: Push test tags without ‘-test’ suffix”# BAD - looks like a real release!git tag runtime/v0.0.1git push origin runtime/v0.0.1✅ DO: Use -test suffix for experimental tags
Section titled “✅ DO: Use -test suffix for experimental tags”# GOOD - clearly marked as testgit tag runtime/v0.0.1-testgit push origin runtime/v0.0.1-test❌ DON’T: Leave test tags for more than 5 minutes
Section titled “❌ DON’T: Leave test tags for more than 5 minutes”# If you push a test tag, delete it within 5 minutes# or it will be cached by Go proxy for 24 hoursBetter: Just use the local test script (Strategy 1) instead of risking it.
Go Proxy Caching Behavior
Section titled “Go Proxy Caching Behavior”Important facts about Go’s module proxy:
- First Request: When someone runs
go get, the proxy caches the module - Cache Duration: Modules are cached for 24 hours minimum
- Cannot Un-publish: Once cached, you cannot remove a version
- Test Window: You have ~5-10 minutes before proxy caches it
- Best Practice: Always test in separate repo or with -test suffix
Cleanup Commands
Section titled “Cleanup Commands”Remove Local Test Tags
Section titled “Remove Local Test Tags”git tag -d runtime/v0.0.1-testgit tag -d pkg/v0.0.1-testgit tag -d sdk/v0.0.1-testgit tag -d tools/arena/v0.0.1-testgit tag -d tools/packc/v0.0.1-testRemove Remote Test Tags (QUICKLY!)
Section titled “Remove Remote Test Tags (QUICKLY!)”# Only works if done within ~5 minutes of pushinggit push origin --delete runtime/v0.0.1-testgit push origin --delete pkg/v0.0.1-testgit push origin --delete sdk/v0.0.1-testgit push origin --delete tools/arena/v0.0.1-testgit push origin --delete tools/packc/v0.0.1-testDelete Test Branches
Section titled “Delete Test Branches”# Localgit branch -d release-test/arena-v0.0.1
# Remotegit push origin --delete release-test/arena-v0.0.1Manual Testing Workflow
Section titled “Manual Testing Workflow”For manual testing without scripts:
# 1. Create a backup branchgit checkout -b backup-before-release-testgit push origin backup-before-release-test
# 2. Create release test branchgit checkout -b release-test-manual
# 3. Modify go.mod in tools/arenacd tools/arenago mod edit -dropreplace=github.com/AltairaLabs/PromptKit/runtimego mod edit -dropreplace=github.com/AltairaLabs/PromptKit/pkgcat go.mod # Review changes
# 4. Try to build (will fail if deps not published)go build ./...
# 5. Restore originalgit checkout go.mod go.sumcd ../..
# 6. Delete test branchgit checkout maingit branch -D release-test-manualSuccess Criteria
Section titled “Success Criteria”Before doing a real release, ensure:
- Local test script runs successfully
- GitHub Actions workflow runs without errors
- Test repository installation works:
go install ...@version - You understand the Go proxy caching behavior
- You have a rollback plan
- Documentation is updated with install instructions
Questions?
Section titled “Questions?”-
Q: Can I undo a published tag?
- A: No, once cached by Go proxy (5-10 min), it’s there for 24h minimum
-
Q: What if I mess up a version?
- A: Publish a new patch version (v1.0.1) - don’t try to delete/overwrite
-
Q: How long should I wait between dependency and tool tags?
- A: 5-10 minutes for Go proxy to cache the dependencies
-
Q: Can I test
go installwithout publishing?- A: Yes, use a private test repository or local replace directives
Next Steps
Section titled “Next Steps”- Run
./scripts/test-release.sh arena v0.0.1-testto understand the process - Create a test repository for full integration testing
- Review the automated release workflow in
.github/workflows/release-test.yml - When ready, follow the real release process in
docs/RELEASE.md(to be created)