Skip to content

Refactor release workflow and update documentation#297

Merged
jfrench9 merged 1 commit intomainfrom
refactor/create-release-flow
Feb 6, 2026
Merged

Refactor release workflow and update documentation#297
jfrench9 merged 1 commit intomainfrom
refactor/create-release-flow

Conversation

@jfrench9
Copy link
Member

@jfrench9 jfrench9 commented Feb 6, 2026

Summary

This PR enhances the release deployment workflow and updates the project documentation to reflect recent infrastructure improvements.

Key Accomplishments

  • Enhanced Release Workflow: Significantly expanded the GitHub Actions release workflow with improved automation, error handling, and deployment capabilities
  • Documentation Updates: Updated README.md to reflect current project state and deployment procedures
  • Infrastructure Improvements: Streamlined the release process with better CI/CD integration and workflow orchestration

Changes Made

  • Refactored .github/workflows/create-release.yml with substantial enhancements (~167 net lines added)
  • Updated project documentation in README.md with revised deployment guidance
  • Improved workflow reliability and automation coverage

Breaking Changes

None identified - this is primarily a workflow and documentation enhancement.

Testing Notes

  • Verify that the updated release workflow triggers correctly on designated events
  • Confirm that all workflow steps execute successfully in the CI environment
  • Validate that documentation changes accurately reflect current deployment procedures

Infrastructure Considerations

  • The enhanced workflow may have different resource requirements or execution times
  • Review workflow permissions and secrets configuration to ensure compatibility
  • Monitor initial workflow runs to validate performance and reliability improvements

🤖 Generated with Claude Code

Branch Info:

  • Source: refactor/create-release-flow
  • Target: main
  • Type: refactor

Co-Authored-By: Claude noreply@anthropic.com

- Revised the README to clarify the multi-tenant architecture and tiered infrastructure for LadybugDB.
- Improved deployment workflows by adding checks for ACTIONS_TOKEN availability, enabling dispatch-based deployments for better monitoring.
- Introduced reusable workflows as a fallback when ACTIONS_TOKEN is not set, ensuring consistent deployment processes across environments.
Comment on lines +157 to +178
needs: create-tag
runs-on: ubuntu-latest
outputs:
use_dispatch: ${{ steps.check.outputs.use_dispatch }}
steps:
- name: Check for ACTIONS_TOKEN
id: check
run: |
if [ "${{ secrets.ACTIONS_TOKEN != '' }}" = "true" ]; then
echo "use_dispatch=true" >> $GITHUB_OUTPUT
echo "✅ ACTIONS_TOKEN available - will dispatch independent workflow runs"
else
echo "use_dispatch=false" >> $GITHUB_OUTPUT
echo "ℹ️ ACTIONS_TOKEN not set - using reusable workflows (bundled in this run)"
fi

# ============================================================================
# DISPATCH-BASED DEPLOYMENTS (when ACTIONS_TOKEN is available)
# Each deployment runs as an independent workflow for better monitoring
# ============================================================================

deploy-staging-dispatch:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
Comment on lines +179 to +214
needs: [create-branch, create-tag, check-deploy-method]
if: |
needs.check-deploy-method.outputs.use_dispatch == 'true' &&
(inputs.deploy_target == 'staging' || inputs.deploy_target == 'all')
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
run_id: ${{ steps.dispatch.outputs.run_id }}
steps:
- name: Dispatch staging deployment
id: dispatch
env:
GH_TOKEN: ${{ secrets.ACTIONS_TOKEN }}
run: |
echo "🚀 Dispatching staging deployment from tag ${{ needs.create-tag.outputs.tag_name }}"

# Trigger the workflow
gh workflow run staging.yml \
--repo ${{ github.repository }} \
--ref ${{ needs.create-tag.outputs.tag_name }}

# Wait briefly for the run to be created
sleep 5

# Get the run ID of the triggered workflow
RUN_ID=$(gh run list \
--repo ${{ github.repository }} \
--workflow=staging.yml \
--limit 1 \
--json databaseId \
--jq '.[0].databaseId')

echo "run_id=$RUN_ID" >> $GITHUB_OUTPUT
echo "✅ Staging deployment dispatched: https://github.com/${{ github.repository }}/actions/runs/$RUN_ID"

deploy-prod-dispatch:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
Comment on lines +215 to +264
needs: [create-branch, create-tag, check-deploy-method, deploy-staging-dispatch]
if: |
always() &&
needs.check-deploy-method.outputs.use_dispatch == 'true' &&
(inputs.deploy_target == 'prod' || inputs.deploy_target == 'all') &&
(needs.deploy-staging-dispatch.result == 'success' || needs.deploy-staging-dispatch.result == 'skipped')
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
run_id: ${{ steps.dispatch.outputs.run_id }}
steps:
- name: Wait before prod deployment
if: inputs.deploy_target == 'all'
run: |
echo "⏳ Waiting 30 seconds before dispatching prod deployment..."
echo " (prod.yml has concurrency group - will queue if staging still running)"
sleep 30

- name: Dispatch prod deployment
id: dispatch
env:
GH_TOKEN: ${{ secrets.ACTIONS_TOKEN }}
run: |
echo "🚀 Dispatching prod deployment from tag ${{ needs.create-tag.outputs.tag_name }}"

# Trigger the workflow
gh workflow run prod.yml \
--repo ${{ github.repository }} \
--ref ${{ needs.create-tag.outputs.tag_name }}

# Wait briefly for the run to be created
sleep 5

# Get the run ID of the triggered workflow
RUN_ID=$(gh run list \
--repo ${{ github.repository }} \
--workflow=prod.yml \
--limit 1 \
--json databaseId \
--jq '.[0].databaseId')

echo "run_id=$RUN_ID" >> $GITHUB_OUTPUT
echo "✅ Prod deployment dispatched: https://github.com/${{ github.repository }}/actions/runs/$RUN_ID"

# ============================================================================
# REUSABLE WORKFLOW DEPLOYMENTS (fallback when ACTIONS_TOKEN not available)
# Deployments run as part of this workflow - less visibility but no PAT needed
# ============================================================================

deploy-staging-reusable:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
@jfrench9 jfrench9 merged commit fbe75a6 into main Feb 6, 2026
15 checks passed
@jfrench9 jfrench9 deleted the refactor/create-release-flow branch February 6, 2026 04:43
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