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