Skip to content

Pass npm version as job output for cross-job consistency - #88

Draft
knutwannheden wants to merge 1 commit into
mainfrom
fix/npm-version-passthrough
Draft

Pass npm version as job output for cross-job consistency#88
knutwannheden wants to merge 1 commit into
mainfrom
fix/npm-version-passthrough

Conversation

@knutwannheden

Copy link
Copy Markdown
Contributor

Summary

  • Extract the npm version from rewrite-javascript-version.txt after build/publish and expose it as a workflow output
  • Callers (like openrewrite/rewrite) can pass this version to the npm-publish job so it publishes the correct version

Companion PR: openrewrite/rewrite (pending)

Context

The npm-publish job runs in a separate workflow job with a fresh checkout, so it cannot read the version.txt file written during the build/release job. This caused release builds (e.g. v8.75.3) to publish the wrong npm version (e.g. 8.76.0-20260311-003608) because Nebula computed a snapshot version without -Prelease.useLastTag=true.

Test plan

  • Verify snapshot CI publishes matching npm version
  • Verify release publish uses the correct tag version for npm

The npm-publish job runs in a separate workflow job with a fresh checkout,
so it cannot read the version.txt file written during the build/release job.
This caused release builds (e.g. v8.75.3) to publish the wrong npm version
(e.g. 8.76.0-20260311-003608) because Nebula computed a snapshot version
without -Prelease.useLastTag=true.

Extract the npm version from rewrite-javascript-version.txt after build/publish
and expose it as a workflow output so callers can pass it to the npm-publish job.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

1 participant