Skip to content

Add changelog automation for sdk's 9 publishable packages#15

Merged
Alexays merged 16 commits into
masterfrom
feat/changelog-automation
Jul 13, 2026
Merged

Add changelog automation for sdk's 9 publishable packages#15
Alexays merged 16 commits into
masterfrom
feat/changelog-automation

Conversation

@Alexays

@Alexays Alexays commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Ports screeb/tag's tag-push → draft-release → human-review → publish → CHANGELOG.md changelog automation to this repo's 9 publishable SDK packages, generalized behind a single package/tag mapping table (scripts/changelog/packages.mjs) instead of duplicating 18 workflow files.
  • changelog-draft.yml: on a package tag push, generates release notes from that package's commit range via claude -p and opens a DRAFT GitHub release.
  • changelog-publish.yml: when a human publishes that draft, syncs the final notes into packages/<dir>/CHANGELOG.md and commits straight to master (no branch protection on this repo, so no bot PAT needed).
  • Two independent secret-scan gates (draft-generation + publish-time) hard-fail before anything is published, ported from the existing screeb/tag implementation.
  • Fixes an edge case vs. the reference implementation: sync.mjs's prependSection now correctly inserts new entries above legacy content in packages/sdk-flutter/CHANGELOG.md and packages/sdk-maui/CHANGELOG.md, which predate the ## vX.Y.Z heading convention (the ported original would have silently appended at the bottom instead).
  • Also fixes: README's SDK/examples tables were missing Kotlin Multiplatform (KMP) entirely.

Design spec and implementation plan (local-only, not part of this repo — see .gitignore) are available on request if useful for review context.

Test plan

  • npm run test:changelog — 46/46 tests pass (package mapping, secret-scan gate, generator, sync, resolve-package CLI)
  • npm test — full existing suite green, no regressions
  • Manual end-to-end dry run: node scripts/changelog/generate.mjs --tag @screeb/sdk-browser@0.7.0 --format=release produced correct, properly-grouped Markdown against real repo history
  • Both new workflow YAML files validated with yaml.safe_load
  • Verified packages/sdk-flutter/CHANGELOG.md and packages/sdk-maui/CHANGELOG.md are untouched by this PR (only affected the next time a real release runs through changelog-publish.yml)
  • Manual follow-up required, cannot be automated: a CLAUDE_CODE_OAUTH_TOKEN repo secret must be added to ScreebApp/sdk (same as already exists on ScreebApp/screeb) before changelog-draft.yml can run in CI

🤖 Generated with Claude Code

Alexays added 10 commits July 9, 2026 08:51
docs/superpowers/ (specs, plans) and .superpowers/ (subagent-driven
progress ledger) are local working files, never meant to land in this
repo's history.
- changelog-publish.yml: also trigger on `prereleased` (GitHub fires that,
  not `released`, for a pre-release publish), and add a `concurrency`
  group so two releases published close together can't race pushing to
  master.
- changelog-draft.yml: write generated notes to $RUNNER_TEMP/notes.md
  instead of the shared /tmp, since the self-hosted runner is persistent.
- generate.mjs: resolve a "no prior tag" `git describe` failure to no
  previous tag instead of throwing, so a package's first-ever tagged
  release generates notes from full history instead of crashing.
@Alexays Alexays force-pushed the feat/changelog-automation branch from fbdbf19 to 47783bd Compare July 9, 2026 10:41
Alexays added 6 commits July 9, 2026 16:04
Also adds packages/sdk-reactnative/CHANGELOG.md, which didn't exist
yet. Both use the corrected/complete history (fixes typos and dates
vs. the previous partial sdk-flutter file), formatted so future
entries from changelog-publish.yml still insert above this content
correctly (verified: prependSection anchors on the leading title
block since none of these legacy headings match the `## v` pattern).
Also adds the same 4.0.2 entry to sdk-maui, above its existing 0.1.0
entry. Both wrappers were missing a changelog entry for the native
Android/iOS 4.0.2 bump that sdk-flutter and sdk-reactnative already
document. sdk-kmp had no CHANGELOG.md at all yet.
The pasted historical content had lost its markdown links along the
way (plain "Release Notes" text). Restored them using the same
per-platform Notion URLs sdk-maui's original entry already used,
applied consistently across all four mobile SDK changelogs.
Adds packages/sdk-android/CHANGELOG.md and packages/sdk-ios/CHANGELOG.md
with their full historical release notes, and repoints every wrapper
changelog's "Release Notes" link (sdk-flutter, sdk-reactnative,
sdk-kmp, sdk-maui) from the old Notion pages to these files.

Absolute GitHub blob URLs, not relative paths: these wrapper packages
get published standalone to pub.dev/npm/NuGet/Maven, which don't
preserve sibling directories.

Not yet wired into changelog-draft/publish.yml — native releases
don't happen via tags in this repo, so these two files are hosted
here as the source of truth for now, pending the sdk-ios/sdk-android
automation phase.
The quoted form relied on node --test's own glob support, which
differs between Node versions: works on Node 26 (local), but Node 24
(this repo's CI runner) treats the literal '*.test.mjs' string as a
single file path and fails with "Could not find". Unquoting lets the
shell expand the glob before node ever sees it, which is portable
across Node versions.
@Alexays Alexays merged commit 46b8ae0 into master Jul 13, 2026
6 checks passed
@Alexays Alexays deleted the feat/changelog-automation branch July 13, 2026 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant