From f48020e9c3b5cef80f3c80911728538060c5a13c Mon Sep 17 00:00:00 2001 From: Jason Kummerl Date: Thu, 25 Jun 2026 15:37:44 -0400 Subject: [PATCH] ci(npm-publish): refresh README ecosystem footer on release Fetch docs-kit's standalone README updater from the private repo and run\nit during the version bump (after pnpm version, before the commit), folding\nREADME.md into the signed version-bump commit. Best-effort: a failed fetch\nor roster blip only warns.\n\nCo-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/npm-publish.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 05b84bc..a77f16e 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -439,8 +439,23 @@ jobs: ESCAPED_TITLE=$(echo "$PR_TITLE" | sed 's/[`$"\]/\\&/g') ESCAPED_URL=$(echo "$PR_URL" | sed 's/[`$"\]/\\&/g') - # Commit the version changes - git add package.json + # Refresh the managed README footer (the docs-kit ecosystem block + + # standardized License/Credits). Runs AFTER `pnpm version` so the + # working tree is clean when pnpm runs — pnpm version aborts on a + # dirty tree. Fetched raw from the private docs-kit repo (no install, + # no dependency here); reuses $GITHUB_TOKEN (ACTIONS_KEY) for auth. + # Best-effort: a failed fetch or roster blip only warns. + UPDATER="$RUNNER_TEMP/update-ecosystem-readme.mjs" + if curl -fsSL -H "Authorization: token $GITHUB_TOKEN" \ + https://raw.githubusercontent.com/humanspeak/docs-kit/main/scripts/update-ecosystem-readme.mjs \ + -o "$UPDATER"; then + node "$UPDATER" || echo "::warning::ecosystem updater errored; README left unchanged" + else + echo "::warning::could not fetch ecosystem updater; skipping README refresh" + fi + + # Commit the version changes (and any refreshed README ecosystem block) + git add package.json README.md git commit -m "Bump version to ${NEW_VERSION} [skip ci]" # Create an annotated tag with release notes