Skip to content

Fix npm and NuGet version mismatch across CI jobs#6937

Draft
knutwannheden wants to merge 1 commit intomainfrom
frothy-lynx
Draft

Fix npm and NuGet version mismatch across CI jobs#6937
knutwannheden wants to merge 1 commit intomainfrom
frothy-lynx

Conversation

@knutwannheden
Copy link
Contributor

@knutwannheden knutwannheden commented Mar 11, 2026

Summary

  • Accept npm_version input in npm-publish.yml and pass it as -PnpmVersion Gradle property

  • Add npmVersion Gradle property support to rewrite-javascript/build.gradle.kts (highest priority override)

  • Fix rewrite-csharp/build.gradle.kts to read from version.txt before generating a fresh timestamp (same fix Python/JS already had from 750bc71)

  • Pass npm_version from build/release job outputs in ci.yml and publish.yml

  • Companion PR: Pass npm version as job output for cross-job consistency gh-automation#88

Context

The npm-publish workflow was decoupled into a separate job in 0947a14. Since it does a fresh checkout, it loses the version.txt written during build. For the release of v8.75.3, this caused npm to publish 8.76.0-20260311-003608 because Nebula computed the next snapshot version without -Prelease.useLastTag=true.

The C# NuGet version also had a latent mismatch bug for snapshots — it was never updated with the version.txt-reading fix from 750bc71 that Python and JS received.

Test plan

  • Verify snapshot CI publishes matching versions across Maven, PyPI, npm, NuGet
  • Verify release publish uses the correct tag version for all package registries

The npm-publish workflow runs as a separate job with a fresh checkout, so
it lost the version determined during build/release. For releases like
v8.75.3, this caused npm to publish 8.76.0-20260311-003608 instead.

- Accept npm_version from upstream workflow and pass it as Gradle property
- Add npmVersion Gradle property support to rewrite-javascript build
- Fix rewrite-csharp to read version.txt before generating a fresh timestamp
  (same fix Python/JS already had from 750bc71)
- Pass npm_version from build/release job outputs in ci.yml and publish.yml
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