Fix validate_prerelease job being skipped by adding missing explicit condition #216
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
GitHub Actions workflows were still stopping after the "Create GitHub Prerelease" step and never completing the full release process, even after PR #214 was merged. Investigation revealed that the
validate_prerelease
job was still being skipped, which caused all subsequent dependent jobs to also be skipped:This was evident in workflow run 17506332908 where the alpha release completed only the build and prerelease creation steps.
Root Cause
While PR #214 correctly fixed the condition syntax in the reusable workflow
.github/workflows/reusable-validate-homebridge.yml
, the calling workflow was missing an explicitif
condition on thevalidate_prerelease
job itself.In GitHub Actions, jobs that use reusable workflows often need explicit
if
conditions to ensure they run when their dependencies complete successfully. Without this condition, GitHub Actions may skip the job even when dependencies are met.Solution
Added the missing explicit
if
condition to thevalidate_prerelease
job:This pattern matches other validation jobs in the same workflow, such as
validate_apt
which already hadif: needs.publish_apt.result == 'success'
.Testing
Added comprehensive test
test/test-validate-prerelease-fix.sh
that validates:if
conditionAll existing tests continue to pass, including the workflow condition tests from PR #214.
Impact
This completes the fix started in PR #214. The full release process should now work correctly for all release types (alpha, beta, stable):
Fixes #215.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.