Skip to content

Add automated versioning and rollback deployment workflow#89

Merged
IvanildoBarauna merged 2 commits intomainfrom
claude/auto-release-deploy-workflow-MVIPX
Mar 4, 2026
Merged

Add automated versioning and rollback deployment workflow#89
IvanildoBarauna merged 2 commits intomainfrom
claude/auto-release-deploy-workflow-MVIPX

Conversation

@IvanildoBarauna
Copy link
Member

Summary

This PR introduces automated semantic versioning and a rollback deployment capability to the CI/CD pipeline. The deployment workflow now automatically computes and tags releases, creates GitHub releases, and a new manual rollback workflow enables quick recovery to previous versions.

Key Changes

  • Automated Versioning: Added version computation logic that automatically increments patch versions based on the latest GitHub release, eliminating manual version management
  • GitHub Release Creation: The deployment workflow now automatically creates GitHub releases with generated release notes for each deployment
  • Docker Image Tagging: Updated image tagging strategy to use computed semantic versions and latest tag instead of hardcoded main branch tag
  • Rollback Workflow: Added new rollback.yml workflow that enables manual rollback to any previous release or auto-detects the previous version
  • Dynamic Configuration: Updated docker-compose production configuration to use dynamically computed versions instead of hardcoded 1.0.0
  • Permissions Update: Changed contents permission from read to write in the deployment workflow to support GitHub release creation

Implementation Details

  • Version computation extracts the latest release tag, increments the patch version, and stores it as an environment variable for use throughout the workflow
  • The rollback workflow supports both manual version specification and automatic detection of the previous release
  • Both workflows use SSH to deploy to the VPS and pull the appropriate versioned container images
  • Datadog environment variables are properly configured with the computed version for observability

https://claude.ai/code/session_01XtrhxKutum5sw6dqDeT8JY

claude added 2 commits March 4, 2026 01:40
- packages-deploy.yml: computes next patch version from latest GitHub
  Release on every run (fallback v0.9.9 → first release is v1.0.0)
- Docker images now tagged with semantic version + :latest instead of :main
- DD_VERSION env var in both services reflects the actual deployed version
- Creates a GitHub Release after images are confirmed in GHCR
- New rollback.yml: manual workflow that detects the previous release
  automatically (second-to-last) or accepts an explicit version input,
  then pulls the target image from GHCR and redeploys to VPS

https://claude.ai/code/session_01XtrhxKutum5sw6dqDeT8JY
DD_VERSION is the Datadog application version, not the deployment
release version, and must remain fixed at 1.0.0.

https://claude.ai/code/session_01XtrhxKutum5sw6dqDeT8JY
@IvanildoBarauna IvanildoBarauna merged commit 3c9ca4f into main Mar 4, 2026
4 of 5 checks passed
@IvanildoBarauna IvanildoBarauna deleted the claude/auto-release-deploy-workflow-MVIPX branch March 4, 2026 03:22
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.

2 participants