Skip to content

ci(templates): Prioritize release path; gate nuget.org on publish, advise on PRs (backport #2184) - #2187

Merged
agneszitte merged 1 commit into
release/stable/6.6from
mergify/bp/release/stable/6.6/pr-2184
Jul 29, 2026
Merged

agneszitte merged 1 commit into
release/stable/6.6from
mergify/bp/release/stable/6.6/pr-2184

Conversation

@mergify

@mergify mergify Bot commented Jul 29, 2026

Copy link
Copy Markdown

This PR makes two related CI changes to the release path. Both need to reach release/stable/6.6 for the 6.6 SR2 prod release (backport after merge).


1. Prioritize release path over tests on merge builds

Problem

On a merge build (push to main / release/**) the release path — Build → Sign → Publish — competes with the template test matrix (24×3 jobs) for hosted runners. In particular sign (windows-latest) queues behind the 24 Windows test jobs, so signing + publication only start once a runner frees up — delaying the release.

Change

GitHub Actions has no native job priority, so it's expressed as a dependency: generate-test-matrix (which every test job already depends on) is gated on the full release path — it waits for build + the publish jobs before generating the matrix.

Behavior

  • Merge build: build → sign → publish* runs first (grabs the runners); the test matrix runs after publication. Release fast-forwards.
  • PRs / schedule / dispatch: the publish jobs are skipped (push-only), so the skip-tolerant condition lets the matrix run right after build — tests prioritized, no regression.

2. Gate the nuget.org check on publication only; advise on PRs

Problem

The nuget.org dependency check (added in #2181) blocked every trigger on the full Uno.* closure being public. That's correct for dev, but wrong for a stable release: stable packages are built + signed + pushed to the internal feed and deeply tested first, and are published to nuget.org only at the very end. So a stable release build — or a PR bumping the SDK to not-yet-published stable versions (e.g. #2178) — failed on packages that are intentionally not public yet. A PR build doesn't even need nuget.org (it restores from the internal feed), so blocking it was guarding a non-problem.

Change — the blocking gate lives only where we publish

Path Job Scope
Dev publish (push to main) verify_dependencies_dev → gates publish_dev full closure
Prod publish (push to release/**) verify_dependencies_prod → gates publish_release_nuget_org (runs publish_release_uno → verify → publish_nuget_org) full closure
Pull request report_dependencies (non-blocking) prerelease (dev) deps, direct manifest entries
  • The publish gates guarantee we never push a package publicly while a dependency (or a previously-released stable, in release order) is missing from nuget.org.
  • PRs never block. report_dependencies runs the check in report-only + prerelease-only mode and, for any dev dependency not yet on nuget.org, posts a resolvable inline PR comment on the manifest line. The build/tests are unaffected (internal feed). This also future-proofs internal-feed-only packages: they surface as advisory comments, not false failures.

Script (Verify-NuGetDependenciesOnNuGetOrg.ps1)

  • -PrereleaseDependenciesOnly — verify only prerelease-versioned coordinates (direct + transitive); stable versions skipped.
  • -ReportOnly / -ReportOutputPath — collect missing deps and emit JSON without failing (for the PR advisory).
  • Fixed a latent list-return bug (return ,$list) so an empty/filtered result keeps its List typing.

New build/Report-MissingDependenciesOnPr.ps1

Reads the report JSON, groups packages by manifest line, and posts an idempotent (hidden per-version:line marker), resolvable review-thread comment per line. Never fails the job; -DryRun for local runs.


Validation

  • Unit: 44/44 Pester green (added Test-IsPrereleaseVersion, Select-ChecksForVerification, ConvertTo-MissingDependencyReport, prerelease-only transitive behavior).
  • End-to-end (real nuget.org): prerelease-only skips a fake stable + verifies a public dev pkg; full closure fails on the fake stable; stable-only manifest (the chore(sdk): Update Uno.Sdk to 6.6 SR2 (6.6.184) + register SimpleTheme packages #2178 case) → 0 checked; report-only emits JSON + exits 0; poster -DryRun locates the correct line; the exact gh api review-comment call posts + is resolvable.
  • Live on this PR: a temporary version bump made report_dependencies post a resolvable inline comment (github-actions[bot], anchored on the manifest line, non-blocking); the temp change has been reverted.
  • CI wiring: ci.yml parses; job graph verified, no cycles; Verify Dependencies (dev publish) correctly skips on PRs.

Follow-up to #2181. Both changes need to be on release/stable/6.6 for the 6.6 SR2 prod release — backport after merge.

Related to https://github.com/unoplatform/private/issues/1102


This is an automatic backport of pull request #2184 done by [Mergify](https://mergify.com).

…vise on PRs

Two related CI changes to the release path (backport to release/stable/6.6 after merge).

1) Prioritize release path over tests on merge builds
   generate-test-matrix waits for build + the publish jobs, so on a push to
   main/release the sign + publish jobs grab the hosted runners first and the
   test matrix runs after publication. On PRs/schedule/dispatch the publish
   jobs skip, so the skip-tolerant condition runs the matrix right after build.

2) Gate the nuget.org dependency check on publication only; advise on PRs
   The check previously blocked every trigger on the full Uno.* closure being
   public, which wrongly failed stable-release builds and PRs referencing
   not-yet-published stable versions (stable packages are staged on the internal
   feed and tested first, published to nuget.org only at the end). Now:
   - verify_dependencies_dev  gates publish_dev (push to main, full closure)
   - verify_dependencies_prod gates publish_release_nuget_org (release, full
     closure; runs publish_release_uno -> verify -> publish_nuget_org)
   - report_dependencies (PRs) is non-blocking: it runs the check in report-only
     + prerelease-only mode and posts a resolvable inline comment for any dev
     dependency not yet on nuget.org. Build/tests are unaffected (internal feed),
     and internal-feed-only packages surface as advisories, not false failures.

Script (Verify-NuGetDependenciesOnNuGetOrg.ps1):
- Add -PrereleaseDependenciesOnly (verify only prerelease coordinates, direct +
  transitive) and -ReportOnly / -ReportOutputPath (collect + emit JSON, no throw).
- Return the checks list with a unary comma so an empty/filtered result keeps its
  List typing (a bare return enumerates to a scalar/null and breaks later .Add()).
- Splat params via hashtable in ci.yml (an array splat binds positionally).

New build/Report-MissingDependenciesOnPr.ps1:
- Groups missing packages by manifest line and posts idempotent (per version:line
  marker), resolvable review-thread comments; never fails the job. -DryRun for
  local validation.

Decouple build from the gate; drop verify_dependencies from generate-test-matrix.

Validation: 44/44 Pester; report-mode + poster DryRun + live gh api call; and a
temporary version bump confirmed report_dependencies posts a resolvable inline
comment on the PR (reverted).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
(cherry picked from commit 9e13652)
@agneszitte
agneszitte merged commit 4b08c10 into release/stable/6.6 Jul 29, 2026
3 of 6 checks passed
@agneszitte
agneszitte deleted the mergify/bp/release/stable/6.6/pr-2184 branch July 29, 2026 02:23
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