main by running tests, collecting coverage, and building the desktop bundle. It acts as the gate a commit must pass before it can be promoted to production.
Overview
Trigger
Runs automatically on every push to
main, and can also be triggered manually via workflow_dispatch.Environment
Uses the
staging GitHub Actions environment, which supplies STAGING_* secrets to the validation job.Running the staging check locally
Run the same validation that CI executes:scripts/validate-staging.sh) performs the following steps in order:
Check for required env templates
Verifies that all three
.env.example files exist:packages/backend/.env.examplepackages/mobile/.env.examplepackages/desktop/.env.example
GitHub Actions workflow
Thevalidate-staging job in .github/workflows/cd.yml runs on every push to main:
.env files for each package from STAGING_* secrets before running the validation. If a secret is absent, the workflow falls back to safe default values so CI remains reproducible without a full secrets configuration.
After a successful run, the job uploads:
artifacts/staging-release.json— a manifest with the git SHA, ref, and run ID.- Coverage reports for all three packages.
- The compiled desktop bundle at
packages/desktop/dist.
Staging secrets
These secrets must be configured in thestaging GitHub Actions environment:
- Backend
- Mobile
- Desktop
| Secret | Description |
|---|---|
STAGING_DATABASE_URL | Full Prisma-compatible connection string |
STAGING_DB_HOST | Database host |
STAGING_DB_PORT | Database port |
STAGING_DB_NAME | Database name |
STAGING_DB_USER | Database user |
STAGING_DB_PASSWORD | Database password |
STAGING_JWT_SECRET | Secret used to sign JWT tokens |
STAGING_DEFAULT_LOGIN_PASSWORD | Initial admin password |
STAGING_SMTP_HOST | SMTP server host |
STAGING_SMTP_PORT | SMTP server port |
STAGING_SMTP_SECURE | true for TLS, false otherwise |
STAGING_SMTP_USER | SMTP authentication user |
STAGING_SMTP_PASS | SMTP authentication password |
STAGING_EMAIL_FROM | Sender address for outgoing emails |
All secrets have safe defaults in the workflow so validation can run without them. However, tests that exercise real database or email behavior require the actual secrets to be configured.
Release candidate acceptance criteria
A commit is considered a valid release candidate when all of the following are true:yarn validate:stagingpasses locally or in CI.- The
validate-stagingjob in theRelease Pipelineworkflow finishes green. - Coverage reports and
packages/desktop/distare present in the uploaded artifacts. - No open regression reopens a previously closed phase or issue.
Rollback and rejection
If validation fails, the commit is not promoted:- Fix the issue in a
hotfix/*orfeature/*branch. - Re-run
yarn validate:staginglocally to confirm the fix. - Merge to
mainand wait for the workflow to go green. - Do not create a
rc-*tag until CI is fully green.
release/YYYY-MM-DD-rcN+1.