Skip to content

Conversation

@vaind
Copy link
Contributor

@vaind vaind commented Sep 22, 2025

Summary

Fixes an issue where danger and updater workflows cannot download scripts when called from other repositories because GITHUB_WORKFLOW_REF refers to the calling repository's context, not the github-workflows repository where the scripts are located.

Background

When reusable workflows are called from other repositories, GITHUB_WORKFLOW_REF points to the calling repository's context, not the github-workflows repository where our scripts are located. This causes script downloads to fail because the URLs point to the wrong repository.

Changes

  • Reverts to _workflow_version input parameter in both danger.yml and updater.yml
  • Adds Craft release automation to manage version updates:
    • Creates scripts/update-version.ps1 to update _workflow_version defaults
    • Updates .craft.yml to use the script in preReleaseCommand
    • Script ensures proper YAML quoting and includes error handling
  • Updates test workflows to pass ${{ github.sha }} for the _workflow_version parameter

Test plan

  • Test script with simple versions (v2v3)
  • Test script with full semver (2.14.12.15.0)
  • Verify proper YAML quoting in output
  • Confirm workflows accept the _workflow_version parameter
  • Test full Craft release process

🤖 Generated with Claude Code

vaind and others added 7 commits September 22, 2025 08:25
Adds automated version management for Craft releases:
- Creates scripts/update-version.ps1 to update _workflow_version defaults
- Updates .craft.yml to use the script in preReleaseCommand
- Script automatically updates danger.yml and updater.yml workflow defaults

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Ensures the PowerShell script properly quotes version values in YAML
to maintain valid syntax when updating _workflow_version defaults.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Documents the addition of PowerShell version update script and the
revert from GITHUB_WORKFLOW_REF back to _workflow_version parameter.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
The core problem is that script download URLs cannot use GITHUB_WORKFLOW_REF
when workflows are called from other repositories.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Remove implementation details about Craft automation and focus on the
main issue: GITHUB_WORKFLOW_REF cannot be used for script download URLs.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@vaind vaind changed the title fix: Add Craft release automation with PowerShell version update script fix: Danger and updater download script URLs cannot use GITHUB_WORKFLOW_REF Sep 22, 2025
@vaind vaind marked this pull request as ready for review September 22, 2025 07:09
@vaind vaind merged commit c8c3a19 into main Sep 22, 2025
26 checks passed
@vaind vaind deleted the fix/workflow-script-downloads branch September 22, 2025 07:25
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