New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for publishing legacy versions in release script #230
Conversation
|
## Summary Releasing earlier versions to npm is a pain. This PR ensures we: 1. Find the actual latest version of the package 2. Publish the legacy version using the `latest` tag, ensuring semver updates work as expected 3. Re-tag `latest` as the version found in step 1 Following this, we should be ready to support backporting and legacy releases purely with labels and PRs. 🥳 ## Related - mermaid-js/mermaid#4200 - bower/bower#2041 - npm/npm#6778 (cherry picked from commit 55c3b1c)
…gs (#236) ## Summary The release script in #224 and #230 almost worked. We see in run to release a `v1.x` backport that the following command failed: https://github.com/inngest/inngest-js/actions/runs/5244055017/jobs/9469531269 ``` $ npm dist-tag add inngest@2.0.1 latest npm ERR! code E401 npm ERR! 401 Unauthorized - PUT https://registry.yarnpkg.com/-/package/inngest/dist-tags/latest ``` Looks like it's defaulting to using Yarn's registry URL instsead of npm's. We get around this during publishing as we specify `publishConfig.registry` in our `package.json`, but it seems that `npm dist-tag` doesn't obey this same property. Let's manually set the registry for this particular command to ensure it tries to affect the right place. ## Related - #224 - #230
…gs (#236) ## Summary The release script in #224 and #230 almost worked. We see in run to release a `v1.x` backport that the following command failed: https://github.com/inngest/inngest-js/actions/runs/5244055017/jobs/9469531269 ``` $ npm dist-tag add inngest@2.0.1 latest npm ERR! code E401 npm ERR! 401 Unauthorized - PUT https://registry.yarnpkg.com/-/package/inngest/dist-tags/latest ``` Looks like it's defaulting to using Yarn's registry URL instsead of npm's. We get around this during publishing as we specify `publishConfig.registry` in our `package.json`, but it seems that `npm dist-tag` doesn't obey this same property. Let's manually set the registry for this particular command to ensure it tries to affect the right place. ## Related - #224 - #230 (cherry picked from commit f33464f)
Summary
Releasing earlier versions to npm is a pain. This PR ensures we:
latest
tag, ensuring semver updates work as expectedlatest
as the version found in step 1Following this, we should be ready to support backporting and legacy releases purely with labels and PRs. 🥳
Related
latest
when the published version is not the latest npm/npm#6778