Fix stale CI workflows and add wildcard branch targeting - #993
Merged
Conversation
…tability
The dotnet-build, package-build, and CodeQL workflows only ever targeted
v16/main (CodeQL also had v17/main), so nothing runs against v18/main today.
On top of the stale branch targeting, dotnet-build.yml/package-build.yml were
broken outright:
- referenced ./uSync.sln, which no longer exists (repo now uses uSync.slnx)
- pinned dotnet-version 9.0.x, but all projects target net10.0
- ${{env.Config}}/${{env.OUT_FOLDER}} don't match the declared env.config/
env.out_folder keys (env context lookups are case-sensitive), so the
schema-gen config flag and the artifact upload path silently evaluated
to empty
- package-build.yml's package-up job referenced env.solution_name, which
was only declared in the other job's env block
- the nuget pack list was missing uSync.Extend, uSync.AutoTemplates, and
the root uSync meta-package, and had a Backoffice/BackOffice casing
mismatch - reconciled against dist/build-package.ps1, the current
authoritative package list
Branch triggers now use "*/main" so future vNN/main branches pick these
workflows up automatically instead of needing a manual bump each release.
GitVersion.yml's main-branch regex had the same problem (^v15\/main$,
matching nothing current) - updated to ^v[0-9]+\/main$ and bumped the
inert next-version fallback.
Also added, per follow-up request:
- concurrency groups on all three workflows so a new push/PR cancels the
stale in-flight run
- paths-ignore for **.md/docs/** so doc-only changes skip CI
- pinned actions/setup-node (lts/*) on the workflows that build the
client - dotnet build already shells out to npm via an MSBuild target
(NpmRunBuild), so this was an implicit, unpinned dependency before
- .github/dependabot.yml grouping nuget/npm/github-actions bumps into
one weekly PR per ecosystem instead of one PR per dependency
No nuget push / npm publish step was added - these workflows still only
build and upload a review artifact, per explicit instruction not to
auto-release to nuget.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
uSyncSource.Site is a local Umbraco test site (gitignored via *.Site/ - never committed), but it was still referenced from uSync.slnx. A clean CI checkout has no such project on disk, so `dotnet restore uSync.slnx` failed immediately looking for a project file that doesn't exist. Kept the ability to open a solution with the test site locally: added uSync.local.slnx (already covered by the existing /uSync.*.slnx gitignore rule) with the same project set plus uSyncSource.Site under its own WebSites folder. Keep the two in sync manually when top-level projects are added/removed - this happens rarely. Verified `dotnet restore`/`dotnet build -c Release` succeed against the trimmed uSync.slnx with no reference to the site project. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why
The three GitHub Actions workflows only ever targeted
v16/main(CodeQL also hadv17/main) — none of them run againstv18/maintoday. Investigating further,dotnet-build.ymlandpackage-build.ymlwere also broken independently of branch targeting.What changed
Real bugs fixed (not just stale branches):
./uSync.slnno longer exists (repo moved touSync.slnx) — both workflows would fail to restore/build if triggered.dotnet-version: 9.0.xwas pinned, but all projects targetnet10.0— SDK 9 can't build them. Bumped to10.0.x.${{env.Config}}/${{env.OUT_FOLDER}}don't match the declaredenv.config/env.out_folderkeys — GitHub Actions'envcontext lookup is case-sensitive, so the schema-gen-cflag and the artifact-upload path were silently evaluating to empty.package-build.yml'spackage-upjob referencedenv.solution_name, which was only ever declared in the other job'senv:block. Hoistedsolution_name/test_project/schema_gen_projectto workflow-level env so both jobs share them.uSync.Extend,uSync.AutoTemplates, and the rootuSyncmeta-package, and had aBackoffice/BackOfficecasing mismatch. Reconciled againstdist/build-package.ps1, the current authoritative package list.GitVersion.yml's main-branch regex was^v15\/main$— hasn't matched an actual branch since v15. Updated to^v[0-9]+\/main$and bumped the (currently inert, tag-overridden)next-versionfallback.Future-proofing:
"*/main"instead of a hardcoded list, so the nextvNN/mainbranch picks these workflows up automatically with no manual bump.Follow-up improvements (requested separately):
paths-ignore: ["**.md", "docs/**"]so doc-only changes skip the full build/CodeQL/package pipeline.actions/setup-node@v4(lts/*) on the workflows that build the client. Worth noting why this was needed even without explicit npm steps:uSync.Backoffice.Management.Client.csprojhas an MSBuild target (NpmRunBuild,BeforeTargets="BeforeBuild") that shells out tonpm run buildautomatically, so the plaindotnet buildstep was already implicitly depending on whatever Node happened to be preinstalled on the runner..github/dependabot.ymlgrouping nuget/npm/github-actions bumps into one weekly PR per ecosystem, instead of the one-PR-per-dependency pattern in recent history.What did NOT change
No
dotnet nuget push/npm publishstep was added anywhere — these workflows still only build and upload a review artifact, per explicit instruction not to auto-release to nuget.Verification
js-yaml(no linter available in this environment to actually execute the workflows).dist/build-package.ps1.🤖 Generated with Claude Code