From 0c1813b9dbdaf0607b513d346a544cc4cc7b8f38 Mon Sep 17 00:00:00 2001 From: resq-sw Date: Sun, 10 May 2026 02:45:40 -0400 Subject: [PATCH] ci(api-docs): sync workflow from resq-software/docs Sync .github/workflows/api-docs.yml from the canonical template at automation/source-repo-templates/api-docs.dotnet.yml in resq-software/docs. Generated by automation/sync-templates.sh. --- .github/workflows/api-docs.yml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml index 77919db..6aadbbb 100644 --- a/.github/workflows/api-docs.yml +++ b/.github/workflows/api-docs.yml @@ -190,14 +190,20 @@ jobs: # .csproj files are usually /.csproj # but DefaultDocumentation expects the assembly name as the # output dir, so search for a .csproj matching the project. + # Some projects have multiple matching .csproj files (e.g. + # both `/.csproj` and + # `packages//.csproj`); only the packaging + # variant has . Scan all candidates and return + # the first one that yields a real version, so we don't + # show "unknown" just because the first match happens + # to be the bare assembly project. candidates = list(pathlib.Path(".").rglob(f"{proj}.csproj")) - if not candidates: - return "unknown" - text = candidates[0].read_text(encoding="utf-8") - for tag in ("Version", "VersionPrefix"): - m = re.search(rf"<{tag}>([^<]+)", text) - if m: - return m.group(1).strip() + for cand in candidates: + text = cand.read_text(encoding="utf-8") + for tag in ("Version", "VersionPrefix"): + m = re.search(rf"<{tag}>([^<]+)", text) + if m: + return m.group(1).strip() return "unknown" print("# ResQ .NET SDK")