👷 [RUM-15055] add release / publish pipeline#56
Conversation
2ef1e13 to
87a534a
Compare
f0fdf31 to
87a534a
Compare
- server bump - changelog generation - script unit tests
- on release PR merge in main, create a release tag - manual workflow to publish a release
87a534a to
e4cc9ea
Compare
e4cc9ea to
6e33e0d
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6e33e0d1a2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
cdn34dd
left a comment
There was a problem hiding this comment.
The PR looks good as-is for now 👍.
One thing we do in the React Native SDK that could prove beneficial here is release content validation: during version bump, we pack the tarball, list its contents, and commit that file list as a baseline (release-content.txt). Then before publish, we pack again and compare against the committed baseline. If the files differ, the workflow fails.
This catches any drift in what gets packaged (accidental file inclusions or missing files) before reaching npm. If the change is intentional, we need to regenerate the baseline and commit it, which shows up in the PR diff.
That seems pretty interesting 👍 |
Motivation
The SDK had no release tooling. This adds a full end-to-end release pipeline covering version bumping, changelog generation, npm publishing via OIDC Trusted Publishers, and GitHub Release creation.
Changes
Release / publish workflow:
Scripts (
scripts/):lib/semver.ts— purebumpVersion(current, bump)utility with testslib/changelog.ts— gitmoji-based commit categorization and Markdown changelog section generation with testslib/git.ts— sharedgetCommitsSinceLastTag()utility used by both CLI scriptsgenerate-changelog.ts— CLI wrapper that prints a changelog section to stdoutprepare-release.ts— interactive local script: preflight checks ($EDITOR,ghauth, clean tree) → version prompt (patch/minor/major/custom) → changelog draft opened in$EDITOR→ release branch + GitHub PR. Supports--dry-run. Exposed asyarn release.GitHub Actions:
.github/workflows/tag-release.yml— triggers on push tomain; automatically creates avX.Y.Zgit tag when the commit message matches a release version.github/workflows/publish.yml— triggered manually viaworkflow_dispatchon the release tag; validates the commit is a release commit, publishes to npm with OIDC Trusted Publishers (--provenance, noNODE_AUTH_TOKENneeded), creates a GitHub Release with changelog section extracted fromCHANGELOG.mdGitLab CI (
.gitlab-ci.yml):notify-release-readyjob: fires when avX.Y.Ztag is pushed, posts a Slack message to#rum-electron-sdk-opswith the workflow URL and the tag ref to useDocs (
docs/DEVELOPMENT.md):Test instructions
Dry-run the prepare-release script:
Expected: preflight checks run, version prompt shown, changelog preview printed, no git changes.
Preview changelog generation:
Expected: Markdown section printed to stdout with commits grouped by gitmoji category.
Checklist