This document describes how to create and publish a new release of Repogen.
- Prerequisites
- Preparing a Release
- Creating a Release
- What Happens During Release
- Post-Release Steps
- Deploying the Repository Archive
- Troubleshooting
Before creating a release, ensure you have:
- Write access to the repository
- All tests passing on main/master branch
- All planned features/fixes merged
- Updated CHANGELOG.md (if applicable)
- Git configured properly (
git config user.nameanduser.email)
If your codebase has version strings, update them:
# Example: Update version in README badges, documentation, etc.
grep -r "v0.1.0" . --exclude-dir=.gitVerify everything works before tagging:
# Run full test suite
make test
# Build test packages
make test-packages-docker
# Run integration tests
make test-integration
# Build the binary
make build
./repogen --helpCheck what's changed since the last release:
# If you have a previous tag (e.g., v0.1.0)
git log v0.1.0..HEAD --oneline
# Or use GitHub compare
# https://github.com/yourusername/repogen/compare/v0.1.0...mainFollow Semantic Versioning:
- MAJOR (v1.0.0 → v2.0.0): Breaking changes
- MINOR (v1.0.0 → v1.1.0): New features, backward compatible
- PATCH (v1.0.0 → v1.0.1): Bug fixes, backward compatible
# Make sure you're on the main branch and up to date
git checkout main
git pull origin main
# Create an annotated tag with a message
git tag -a v1.0.0 -m "Release version 1.0.0"
# Push the tag to GitHub
git push origin v1.0.0Important Notes:
- Always use annotated tags (
-aflag) with a message - Tag format MUST be
v*.*.*(e.g., v1.0.0, v0.2.1, v2.0.0-beta.1) - The
vprefix is required for the GitHub Actions workflow to trigger
After pushing the tag, GitHub Actions will automatically start the release workflow:
- Go to:
https://github.com/yourusername/repogen/actions - Look for the "Release" workflow run
- Monitor the build progress (typically takes 5-10 minutes)
Once the workflow completes:
- Go to:
https://github.com/yourusername/repogen/releases - Find your new release (should be marked "Latest")
- Verify all artifacts are present:
- ✅ Binaries (4):
repogen-linux-amd64,repogen-linux-arm64,repogen-darwin-amd64,repogen-darwin-arm64 - ✅ Debian package:
repogen_VERSION_amd64.deb - ✅ RPM package:
repogen-VERSION-1.x86_64.rpm - ✅ Alpine package:
repogen-VERSION-r0.apk - ✅ Homebrew bottle:
repogen--VERSION.arm64_monterey.bottle.tar.gz - ✅ Repository archives:
repogen-repository-VERSION.zipand.tar.gz - ✅ Checksums:
SHA256SUMS
- ✅ Binaries (4):
The .github/workflows/release.yml workflow performs these steps:
┌─────────────────────────────────────┐
│ Build Binaries (4 platforms) │
│ • Linux amd64/arm64 │
│ • macOS amd64/arm64 (Intel/M1) │
└─────────────────────────────────────┘
↓
┌─────────────────────────────────────┐
│ Create Native Packages │
│ • Debian .deb (dpkg-deb) │
│ • RPM .rpm (rpmbuild) │
│ • Alpine .apk (tar.gz) │
│ • Homebrew .bottle.tar.gz │
└─────────────────────────────────────┘
┌─────────────────────────────────────┐
│ Generate Repository │
│ Uses repogen itself! │
│ Input: dist/ (all packages) │
│ Output: repo/ (full structure) │
└─────────────────────────────────────┘
↓
┌─────────────────────────────────────┐
│ Repository Structure Created │
│ repo/ │
│ ├── dists/stable/ │
│ │ └── Release, Packages │
│ ├── pool/main/r/repogen/ │
│ │ └── *.deb │
│ ├── repodata/ │
│ │ └── repomd.xml, *.xml.gz │
│ ├── Packages/ │
│ │ └── *.rpm │
│ ├── x86_64/ │
│ │ └── APKINDEX.tar.gz, *.apk │
│ └── Formula/ │
│ └── repogen.rb │
└─────────────────────────────────────┘
┌─────────────────────────────────────┐
│ Create Archives │
│ • repogen-repository-VERSION.zip │
│ • repogen-repository-VERSION.tar.gz│
└─────────────────────────────────────┘
↓
┌─────────────────────────────────────┐
│ Generate Checksums │
│ • SHA256SUMS (all files) │
└─────────────────────────────────────┘
↓
┌─────────────────────────────────────┐
│ Create GitHub Release │
│ • Upload all artifacts │
│ • Add release notes │
│ • Mark as latest │
└─────────────────────────────────────┘
- Update project README with new version badges
- Post announcement on relevant channels
- Tweet/blog about new features (if applicable)
If you maintain external documentation:
# Update download links
sed -i 's/v1.0.0/v1.1.0/g' docs/installation.md
# Commit and push
git add docs/
git commit -m "docs: Update to v1.1.0"
git push- Watch GitHub issues for bug reports
- Monitor CI/CD for any problems
- Check download statistics in GitHub Insights
The repository archive (.zip or .tar.gz) is ready to deploy to any web server or S3 bucket.
# Download the repository archive from GitHub releases
VERSION="1.0.0"
wget https://github.com/yourusername/repogen/releases/download/v${VERSION}/repogen-repository-${VERSION}.tar.gz
# Extract
tar xzf repogen-repository-${VERSION}.tar.gz
# Upload to S3
aws s3 sync . s3://your-bucket/packages/ \
--acl public-read \
--cache-control "max-age=3600"
# Optional: Set up CloudFront CDN
aws cloudfront create-invalidation \
--distribution-id YOUR_DIST_ID \
--paths "/*"# Clone your repository
git clone https://github.com/yourusername/homebrew-tap.git
cd homebrew-tap
# Download and extract repository
VERSION="1.0.0"
wget https://github.com/yourusername/repogen/releases/download/v${VERSION}/repogen-repository-${VERSION}.tar.gz
tar xzf repogen-repository-${VERSION}.tar.gz
# Commit and push
git add .
git commit -m "Release v${VERSION}"
git push origin main
# Enable GitHub Pages in repository settings
# Your repo will be available at: https://yourusername.github.io/homebrew-tap/# SSH to your server
ssh user@yourserver.com
# Download and extract
cd /var/www/packages
VERSION="1.0.0"
wget https://github.com/yourusername/repogen/releases/download/v${VERSION}/repogen-repository-${VERSION}.tar.gz
tar xzf repogen-repository-${VERSION}.tar.gz
# Set permissions
chown -R www-data:www-data .
chmod -R 755 .
# Configure nginx or apache to serve the directory
# Users can now access: https://yourserver.com/packages/# Download and extract
VERSION="1.0.0"
wget https://github.com/yourusername/repogen/releases/download/v${VERSION}/repogen-repository-${VERSION}.zip
unzip repogen-repository-${VERSION}.zip -d repo/
# Deploy with Netlify CLI
cd repo
netlify deploy --prod
# Or drag and drop the 'repo' folder in Netlify web UIAfter deploying, users can add your repository:
# Add repository
echo "deb [trusted=yes] https://yourserver.com/packages/ stable main" | sudo tee /etc/apt/sources.list.d/repogen.list
# Install
sudo apt update
sudo apt install repogen# Add repository
sudo tee /etc/yum.repos.d/repogen.repo <<EOF
[repogen]
name=Repogen Repository
baseurl=https://yourserver.com/packages/
enabled=1
gpgcheck=0
EOF
# Install
sudo dnf install repogen# Add repository
echo "https://yourserver.com/packages/" | sudo tee -a /etc/apk/repositories
# Install
sudo apk add --allow-untrusted repogen# Add tap
brew tap yourusername/tap https://yourserver.com/packages/
# Install
brew install repogenProblem: GitHub Actions workflow fails during release.
Solutions:
- Check the Actions log for specific errors
- Verify the tag format is correct (
v*.*.*) - Ensure all required permissions are set in workflow file
- Check if Docker is available (for package building)
Problem: You need to recreate a tag.
Solution:
# Delete local tag
git tag -d v1.0.0
# Delete remote tag
git push origin :refs/tags/v1.0.0
# Recreate and push
git tag -a v1.0.0 -m "Release version 1.0.0"
git push origin v1.0.0Warning: Only do this if the release hasn't been published yet!
Problem: Some build artifacts are missing from the release.
Solutions:
- Check if the build step failed in Actions log
- Verify file paths in
release.yml - Ensure the workflow has write permissions to releases
- Manually re-run the workflow from Actions tab
Problem: Generated repository has incorrect structure.
Solutions:
- Test locally:
./repogen generate --input-dir dist --output-dir test-repo - Verify package detection is working
- Check repogen logs in the workflow
- Ensure all package types are being built correctly
# 1. Prepare
git checkout main
git pull origin main
make test
# 2. Create tag
git tag -a v1.0.0 -m "Release version 1.0.0"
# 3. Push tag
git push origin v1.0.0
# 4. Monitor at: https://github.com/yourusername/repogen/actions
# 5. Verify at: https://github.com/yourusername/repogen/releases
# 6. Deploy repository archive to S3/server
wget https://github.com/yourusername/repogen/releases/download/v1.0.0/repogen-repository-1.0.0.tar.gz
tar xzf repogen-repository-1.0.0.tar.gz
aws s3 sync . s3://your-bucket/packages/ --acl public-readv1.0.0 → First stable release
v1.0.1 → Bug fix
v1.1.0 → New feature (backward compatible)
v2.0.0 → Breaking changes
v1.0.0-beta.1 → Pre-release
v1.0.0-rc.1 → Release candidate
Triggers: Pull requests and pushes to main/master
Purpose: Run tests on every code change to ensure quality
What it does:
- Runs unit tests with race detector
- Builds test packages in Docker
- Runs full integration test suite
- Uploads code coverage
Triggers: Git tags matching v*.*.*
Purpose: Automate the entire release process
What it does:
- Builds binaries for 4 platforms
- Creates native packages (deb, rpm, apk, bottle)
- Generates repository using repogen itself
- Archives repository for deployment
- Creates GitHub release with all artifacts
- Adds installation instructions
- Always use annotated tags:
git tag -anotgit tag - Test before tagging: Run
make testlocally first - Use semantic versioning: MAJOR.MINOR.PATCH format
- Write meaningful tag messages: Describe what's new
- Don't delete published releases: Only delete if absolutely necessary
- Keep CHANGELOG.md updated: Document changes between versions
- Test the artifacts: Download and test at least one artifact type
- Deploy promptly: Deploy repository archive soon after release
- 📖 Read the README.md for general usage
- 🐛 Report issues on GitHub Issues
- 💬 Ask questions in GitHub Discussions
- 📧 Contact maintainers (see MAINTAINERS.md or repository settings)