Skip to content

Fix npm and NuGet version mismatch across CI jobs - #6937

Closed
knutwannheden wants to merge 1 commit into
mainfrom
frothy-lynx
Closed

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

Conversation

@knutwannheden

@knutwannheden knutwannheden commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

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
@github-actions

Copy link
Copy Markdown
Contributor

This PR is stale because it has been open for 90 days with no activity. Remove stale label or comment or this will be closed in two weeks. PRs may be reopened when there is renewed interest.

@github-actions github-actions Bot added the Stale label Jun 29, 2026
@github-actions github-actions Bot closed this Jul 20, 2026
@github-project-automation github-project-automation Bot moved this from In Progress to Done in OpenRewrite Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant