-
Notifications
You must be signed in to change notification settings - Fork 32
Publishing a Release
-
Make sure travis is green on the master branch
-
Setup (once) a github token
-
Make sure you are logged into npm with privileges for publishing to the
@skele
scope:
$ npm adduser --registry=https://registry.npmjs.org --scope=@skele
- run
$ yarn run release
When adding a new package to the repo, make sure the package.json
has the following configuration inside:
"publishConfig": {
"access": "public"
}
NOTE: The following is no longer relevant.
We are using scoped package for all the packages and currently there is a problem when publishing a scoped package via lerna
for the first time. Lerna does not explicitly call npm publish --access public
for our packages, and, for scoped packages, this is required as they default to private.
If you added a new package the default release process will not work.
Follow these steps to publish a release that includes a previously unpublished package:
$ npm adduser --registry=https://registry.npmjs.org --scope=@skele # login
$ yarn clean & yarn # deps
$ ./node_modules/bin/lerna publish --skip-npm # version but do not publish
$ for i in packages/*; do (cd $i && npm publish --access public); done # publish all packages manually with public access
$ yarn run release:github # publish release notes
If publishing to NPM went through, not much you can do except to deprecate the package. If the conventional-github-releaser
failed you can try to fix the problem and re-run just yarn run release:github
.
If the yarn run release:publish
task failed:
- delete the tag, e.g.
git tag -d v1.0.0-alpha.1
- if there is a commit created by lerna (usually it just the version in the commit title), do
git reset --hard HEAD^
... and you can start from the beginning. :)
Skele | Netcetera