ci: run release-build on PRs too — catch Intel Mac regressions pre-merge

Previously release-build was gated behind `github.ref == 'refs/heads/main'`,
so the Intel Mac, aarch64-apple-darwin, and Linux release targets were only
validated AFTER merge to main. If someone broke the Intel Mac cross-compile
by touching feature flags or Cargo dependencies, we'd only find out when
the release tag was cut and the job exploded on main. Extending the guard
to also fire on pull_request means regressions surface in the PR status
check instead of on a release branch.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Sam Valladares 2026-04-22 23:05:10 -05:00
parent 4e6247834e
commit ef4964c785

View file

@ -50,7 +50,12 @@ jobs:
release-build: release-build:
name: Release Build (${{ matrix.target }}) name: Release Build (${{ matrix.target }})
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
if: github.ref == 'refs/heads/main' # Run on main pushes AND on PRs that touch workflows, Cargo manifests, or
# crate sources — so Intel Mac / Linux release targets are validated
# before merge, not after.
if: |
github.ref == 'refs/heads/main' ||
github.event_name == 'pull_request'
needs: [test] needs: [test]
strategy: strategy:
fail-fast: false fail-fast: false