Release Process
This document describes the complete release process for manufacturing-admin, from creating a release to deploying to production.
Overviewโ
The manufacturing-admin release process follows a "build once, deploy many" pattern with three GitHub Actions workflows:
- Tag & Build - Automatically triggered when creating a pre-release
- Deploy to Production (Specific Tag) - Manual deployment with a specific tag
- Deploy to Production (Latest) - Manual deployment with the latest tag
Why Pre-Releases?โ
We create GitHub pre-releases (not full releases) when tagging to:
- Keep the release in draft state until deployed to production
- Prevent confusion about which version is actually live
- Allow the "Deploy Latest" workflow to mark it as the official release after successful deployment
Prerequisitesโ
- Access to the GitHub repository
- Permission to push tags to the repository
- Access to manually trigger GitHub Actions workflows
Complete Release Flowโ
Step 1: Create a Pre-Release on GitHubโ
Version tags must follow semantic versioning: v\{MAJOR\}.\{MINOR\}.\{PATCH\}
- Go to GitHub โ Releases โ Draft a new release
- Click "Choose a tag"
- Type your new version tag (e.g.,
v1.2.3) and select "Create new tag on publish" - Select the target branch (usually
main) - Enter release title (e.g.,
v1.2.3) - Check "Set as a pre-release" โ
- Click "Publish release"
What happens automatically:
- โ CI/CD checks run (Biome, TypeScript, Tests)
- โ Docker image is built
- โ
Image is tagged with the version (e.g.,
web-portal:v1.2.3) - โ
Image is pushed to production registry:
registry.digitalocean.com/manufacturing-admin-production - โ AI-generated release notes are created
- โ GitHub release is updated with formatted notes
- โ
Slack notification posted to
#infra-releaseswith release summary
Important:
- This creates a pre-release (not marked as latest)
- This does NOT deploy to any environment
- The Docker image is ready in the registry for deployment
Step 2: Deploy to Productionโ
You have two options for deploying to production:
Option A: Deploy a Specific Tag (Recommended for precise control)โ
- Go to GitHub Actions โ Release tag to Production
- Click "Run workflow"
- Enter the tag you want to deploy (e.g.,
v1.2.3) - Click "Run workflow"
What happens:
- โ Checks if this is a rollback (deploying older version)
- โ Runs CI/CD checks on the tag
- โ Runs database migrations on production database
- โ Seeds reference tables
- โ Updates app spec to use the specified image tag
- โ Deploys to production: https://mes.birdygrey.com
- โ
Posts deployment notification to
#infra-releases- Shows rollback warning if deploying older version
- Includes link to production site
Option B: Deploy Latest Tagโ
- Go to GitHub Actions โ Release latest tag to Production
- Click "Run workflow"
- Click "Run workflow" (no input needed - auto-detects latest tag)
What happens:
- โ Automatically detects the latest tag
- โ Runs CI/CD checks on the tag
- โ Runs database migrations on production database
- โ Seeds reference tables
- โ Updates app spec to use the latest image tag
- โ Deploys to production: https://mes.birdygrey.com
- โ Marks GitHub release as "published" and "latest" (removes pre-release status)
- โ
Posts deployment notification to
#infra-releases
Note: This workflow will convert your pre-release into a full release and mark it as the latest.
Rollback Processโ
To rollback to a previous version:
- Use Option A (Deploy a Specific Tag)
- Enter the tag of the version you want to rollback to (e.g.,
v1.2.2) - The workflow will detect this is a rollback and notify in Slack
Note: The rollback detection compares commit dates. If the tag you're deploying is older than the current latest release, it will be flagged as a rollback.
Release Notesโ
Release notes are automatically generated using AI (Claude) and include:
- Categorized changes: Bug Fixes, Features, Dependencies, etc.
- Linear ticket links: Automatically converted (e.g.,
INFRA-123โ Linear link) - GitHub PR links: With proper formatting
- Contributor mentions: GitHub usernames โ Slack mentions
- Dependency updates: Grouped together at the bottom
Release notes are posted to:
- Slack
#infra-releaseschannel (Slack markdown format) - GitHub release page (GitHub markdown format)
Workflow Filesโ
.github/workflows/deploy-qa.yml- Tag & Build workflow.github/workflows/release-tag-production.yml- Deploy specific tag.github/workflows/release-latest-production.yml- Deploy latest tag
Environment Configurationโ
Staging Environmentโ
- Trigger: Automatic on push to
mainbranch - URL: https://manufacturing-staging.birdygrey.com
- Workflow:
.github/workflows/deploy-staging.yml
Staging Container Image Managementโ
Staging uses a tag rotation strategy to maintain rollback capability while automatically cleaning up old images:
Tag Rotation Flow:
:candidate- New image is built and pushed with this tag:staging- The:candidateis promoted to:staging(active deployment), then:candidateis deleted:previous- The old:stagingis re-tagged as:previous(rollback target)- Garbage collection - Untagged images are automatically cleaned up
Rollback: The :previous tag enables rollback to the last deployed version. However, the next push to main will automatically deploy new code again, so rollback is temporary unless commits are reverted in the main branch.
Registry: registry.digitalocean.com/manufacturing-admin-staging
Production Environmentโ
- Trigger: Manual workflow dispatch
- URL: https://mes.birdygrey.com
- Database: Separate production database with firewall protection
- Registry:
registry.digitalocean.com/manufacturing-admin-production
Best Practicesโ
- Always test in staging first before creating a production tag
- Use semantic versioning for tags (v{MAJOR}.{MINOR}.{PATCH})
- Always create as pre-release when tagging (not full release)
- Review AI-generated release notes in Slack before deploying
- Deploy during maintenance windows for major releases
- Use "Deploy Latest" workflow to mark releases as official after successful deployment
- Verify production after deployment using the "View Production" link in Slack
Troubleshootingโ
Tag workflow failedโ
- Check GitHub Actions logs for the specific failure
- Common issues:
- Tests failing
- Docker build errors
- Registry authentication issues
Production deployment failedโ
- Check if database migrations succeeded
- Verify app spec was updated correctly
- Check DigitalOcean App Platform logs
Rollback needed urgentlyโ
- Use the rollback process above
- The previous Docker image is still in the registry and can be deployed immediately
Questions?โ
For questions about the release process, reach out in #infra-releases on Slack.