Skip to content

ci: harden release promotion flow#61

Merged
gabedalmolin merged 1 commit intomainfrom
ci/harden-release-promotion-flow
Mar 11, 2026
Merged

ci: harden release promotion flow#61
gabedalmolin merged 1 commit intomainfrom
ci/harden-release-promotion-flow

Conversation

@gabedalmolin
Copy link
Copy Markdown
Owner

Summary

Harden the release and deployment flow so production is promoted intentionally from published releases, while manual dispatch is reserved for controlled non-production deploys.

What changed

  • refactored the deploy workflow into explicit resolve deployment context, verify promotion candidate, deploy, and validate deployment phases
  • added exact-ref verification before every deployment with dependency install, Prisma generation, lint, typecheck, build, coverage, Prisma migrate deploy, and integration tests
  • blocked manual production deployments and moved workflow_dispatch toward staging or homolog-style environments
  • made deployment concurrency environment-aware instead of using a single shared production bucket
  • enforced mandatory production smoke prerequisites so production fails clearly when RAILWAY_PUBLIC_URL is missing or invalid
  • updated the README and Railway deployment guide to document the promotion model, environment-scoped secrets, and expected GitHub Environment protections

Validation

  • npm run lint
  • npm run typecheck
  • npm run build
  • npm test
  • workflow YAML parsed successfully with the local yaml package

Risks/Notes

  • production deploys are now intentionally slower because the release ref is re-verified before promotion
  • manual production dispatch is blocked by design; production promotion must go through a published GitHub release
  • the workflow now assumes Railway credentials are configured on the selected GitHub Environment, not only as repository-wide secrets
  • GitHub Environment protection rules still need to be configured manually in the repository settings

@gabedalmolin gabedalmolin merged commit a283048 into main Mar 11, 2026
5 checks passed
@gabedalmolin gabedalmolin deleted the ci/harden-release-promotion-flow branch March 11, 2026 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant