Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Sep 5, 2025

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:

  • ❌ Validate GitHub Prerelease Artifacts (skipped)
  • ❌ Promote to Full Release (skipped - depends on validation)
  • ❌ Publish to APT Repository (skipped - depends on promotion)
  • ❌ All subsequent validation, cache purging, NPM publishing, and notification steps (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 explicit if condition on the validate_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 the validate_prerelease job:

validate_prerelease:
  name: Validate GitHub Prerelease Artifacts
  needs: [create_prerelease]
  if: needs.create_prerelease.result == 'success'  # ← Added this line
  uses: ./.github/workflows/reusable-validate-homebridge.yml

This pattern matches other validation jobs in the same workflow, such as validate_apt which already had if: needs.publish_apt.result == 'success'.

Testing

Added comprehensive test test/test-validate-prerelease-fix.sh that validates:

  • YAML syntax correctness of the main workflow
  • Presence and correctness of the if condition
  • Consistency with other validation jobs in the workflow
  • Proper job dependencies

All 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):

  1. ✅ Create GitHub Prerelease
  2. ✅ Validate GitHub Prerelease Artifacts (now fixed)
  3. ✅ Promote to Full Release
  4. ✅ Publish to APT Repository
  5. ✅ Validate APT Installation
  6. ✅ Purge Cloudflare Cache
  7. ✅ Publish to NPM
  8. ✅ Send Discord Notification

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.

@Copilot Copilot AI changed the title [WIP] Issue #213 Not Resolved Fix validate_prerelease job being skipped by adding missing explicit condition Sep 5, 2025
@Copilot Copilot AI requested a review from NorthernMan54 September 5, 2025 23:50
Copilot finished work on behalf of NorthernMan54 September 5, 2025 23:50
@NorthernMan54 NorthernMan54 marked this pull request as ready for review September 5, 2025 23:59
@NorthernMan54 NorthernMan54 merged commit a73db42 into latest Sep 6, 2025
@NorthernMan54 NorthernMan54 deleted the copilot/fix-215 branch September 6, 2025 00:01
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.

Issue #213 Not Resolved
2 participants