1

I'm using the semantic-release package which runs on my CI to release my library onto npm through my Github repo.

Recently, I have a breaking change that I have forgotten to add the breaking change text into my commit message before merging. So semantic-release made a minor release and published it onto npm instead of a major release.

Can I simply remove the wrong release created by semantic-release on Github to unpublish it?

How can I undo and unpublish the wrong minor release on Github and npm, and get semantic-release to re-release the recent commit I've made as a major release without messing up my repo?

torek
  • 448,244
  • 59
  • 642
  • 775
Carven
  • 14,988
  • 29
  • 118
  • 161

1 Answers1

0

You will have to remove everything manually.

Please note, once an NPM package has been published to the default npm registry, it can be unpublished within 24 hours (I may be off), but there is a catch, trying to publish the same version again will not work, the registry will block you.

So in case you remove the Git tag created by semantic-release, and the next version is the same as the unpublished one, you're in trouble.


I can also recommend using an alternative to semantic-release called atomic-release. It's an SDK with a strategy to release NPM packages (kind of like semantic-release). Check it out GithubNpmPackageStrategy

Disclaimer: I'm the author of atomic-release.

elad.chen
  • 2,375
  • 5
  • 25
  • 37