API Releases
Guide for releasing Unkey's API as binaries and containers
This document outlines the standard process for releasing Unkey's main artifact (the API) as binaries and containers.
Overview
At Unkey, we use Git tags to trigger our release process. When a tag is pushed to the main branch, a GitHub Action automatically builds the binary and Docker image, pushes the Docker image to GitHub Container Registry (ghcr.io), and creates a GitHub release.
It's important to note that creating a release does not automatically deploy code. Deployments are handled manually as a separate process.
Release Process
Prerequisites
- Ensure all changes you want to include in the release are merged into the main branch
- Verify that all automated tests have passed on the PRs that were merged
Creating a Release
-
Determine the appropriate version number following Semantic Versioning principles:
- Major version (X.0.0): Incompatible API changes
- Minor version (X.Y.0): Backwards-compatible functionality additions
- Patch version (X.Y.Z): Backwards-compatible bug fixes
-
Create and push a Git tag:
-
The GitHub Action workflow will automatically trigger when the tag is pushed to main
-
Once completed, a GitHub release will be created with automatically generated release notes and a message will be posted to
#releases
in slack.
Creating a Prerelease
For testing changes before an official release, you can create a prerelease using a canary tag:
-
Follow the same process as a standard release, but use a prerelease tag format:
-
The GitHub Action workflow will recognize this as a prerelease and mark it accordingly on GitHub
-
Prereleases are useful for testing changes in a production-like environment without affecting stable releases
Release Artifacts
Each release produces:
- Binary files for multiple platforms
- Docker image pushed to GitHub Container Registry (ghcr.io)
- GitHub release with automatically generated release notes
Deploying a Release
Deployment is currently a manual process separate from the release workflow. Please refer to the deployment documentation for details on how to deploy a released version.
Emergency Fixes
We currently don't have a formalized process for emergency fixes or hotfixes. When critical issues are discovered in production, coordinate with the team to determine the best approach for addressing the issue.
Responsibilities
All team members share responsibility in the release process and can create releases when necessary.
Best Practices
- Communicate releases to the team before creating a new tag
- Review changes included in the release before tagging
- Monitor systems after deployment to catch any issues early
- Document significant changes in PR descriptions to ensure clear release notes