I have a personal checklist I go by before I publish anything to a community repository like NPM. I've followed in the past for Nuget and other private repositories too. For example I've posted libraries to internal organization repositories and it's a good idea to follow many of the same checklist items.
- Continuous integration is setup for the particular library that needs to be published.
- The library has a good build, and only on a good build a trigger will deploy specific tagged versions to the repository. i.e. If the build is tagged "v1.x.y" where x and y are valid version increments set for release.
- The library is used by myself, if publishing personally, or "dogfooded" by the team building it within an organization.
- It has to have docs, a clear site that states what that library is for and how to use it. Ideally with as minimal and simple of steps that can be put together.
Basically, I ensure that there are certain gates the library must be moved through before I post the library. Otherwise it simply doesn't get published until it can meet the requirements to pass through those gates.