chore: add npm release workflow for the tracing plugin - #63
Draft
milanagm wants to merge 3 commits into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs LFE-15729. Step 2 of moving this plugin to npm distribution.
Important
Draft, stacked on #62. This branch contains #62's commit, so the diff below also shows
plugins/tracing/package.jsonuntil that PR merges.Why
#62 makes the plugin a publishable npm package. This adds the release automation, modelled on the in-house precedent in
langfuse/pi-observability-plugin.What this PR does
.github/workflows/release.yml(new): tag-triggered onv*, validates versions, installs, lints, tests, stages the package on npm with provenance, then creates a draft GitHub release. Prerelease tags (v0.2.0-rc.1) go out under thenextdist-tag.package.json: addsnpm: 11.15.0as a devDependency.npm stage publishdoes not exist in npm 10.9.8, which is what Node 22 bundles, sopnpm exec npmneeds a pinned newer npm. Same approach pi uses.Verified locally
Each workflow step run by hand (codex-cli 0.149.0, npm 11.15.0, node 24.16.0):
actionlintonrelease.ymlnode -pcommands)package.json0.1.0 ==plugin.json0.1.0pnpm install --frozen-lockfilepnpm run lintpnpm testnpm publish --dry-runfromplugins/tracingprepackbuilds,@langfuse/codex-observability-plugin@0.1.0, 4 filespnpm exec npm --versionin that stepstagesubcommand availablev0.1.0/v0.2.0→latest,v0.2.0-rc.1/v1.0.0-beta.2→nextNot verified, and one thing a maintainer has to do
The workflow has never actually run. It only triggers on a
v*tag, and a test run would stage a real package on npm. The YAML and every step were checked individually; the end-to-end run is open until the first real tag.Before the first release, a maintainer of the
@langfusenpm scope has to configure npm trusted publishing (OIDC) for@langfuse/codex-observability-plugin, with this repository andrelease.ymlas the trusted publisher. Without that, the first run fails at authentication. I do not have access to do this.Release flow this enables
plugins/tracing/package.jsonandplugins/tracing/.codex-plugin/plugin.json, rebuild the bundle (pnpm run build), commit.v<version>and push the tag.npm stage list @langfuse/codex-observability-plugin, thennpm stage approve <stage-id>(requires npm 2FA). Ornpm stage reject.Related
${PLUGIN_ROOT}. Needed before the first version bump: the current hard-codedtracing/0.1.0cache path breaks on any other version. Verified locally. Not touched here to avoid duplicating that PR.