From dac0818c45633ce775e5ecf4ecbe1fb93a39660a Mon Sep 17 00:00:00 2001 From: beamologist Date: Wed, 21 Oct 2026 17:23:54 +0200 Subject: [PATCH] ci: check the README's C# blocks against the package (codebase-checks#8) A reader who copies a C# block out of the README gets code that compiles against this package, and a block that stops compiling fails CI before it ships. The job calls the shared check pinned by full commit SHA; a doc change runs it, since neither workflow has a paths-ignore. The release waits on it: release.yml runs the same check at the tag and the publish job needs it, so the package about to reach NuGet is the one the blocks were compiled against. Refs macula-codebase-checks#8 --- .github/workflows/ci.yml | 9 +++++++++ .github/workflows/release.yml | 10 +++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5cdc6b6..25ff140 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,3 +72,12 @@ jobs: - name: Pack, and check the natives are in it if: matrix.os == 'ubuntu-24.04' run: scripts/check_package.sh + + # Every C# block README.md publishes compiles against this package, and a doc + # change runs this (macula-codebase-checks#8). The pin is a full commit SHA; + # the release waits on this job too. + docs: + name: docs (C# snippets) + permissions: + contents: read + uses: macula-io/macula-ci-images/.github/workflows/doc-snippets-csharp.yml@d25a36c1b6ba7b8e72db17873aa7c2c7793eba70 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2f64665..b43bacb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,8 +13,16 @@ jobs: uses: macula-io/macula-ci-images/.github/workflows/release-guard.yml@2660ee4ce1c51ce3d2bf14043ebc8a2784065cd9 with: version-root: src/Macula + # The docs check the repository runs on every push, run again on the tag: the + # package about to be published is the one the blocks are compiled against + # (macula-codebase-checks#8). + docs: + name: docs (C# snippets) + permissions: + contents: read + uses: macula-io/macula-ci-images/.github/workflows/doc-snippets-csharp.yml@d25a36c1b6ba7b8e72db17873aa7c2c7793eba70 publish: - needs: [release-guard] + needs: [release-guard, docs] name: publish to NuGet runs-on: ubuntu-24.04 environment: release