a release script to tag on github, npm publish
When we do a release we should both tag the release in git as well as do an npm publish, perhaps update the version number in the package.json too to be the next release. Is there some kind of script out there that can help us do this? How does this interact with writing release documentation on github? And how does that interact with the changelog? See also issue #14
This was pointed out by @wyze
You can use npm version before running npm publish.
So running npm version 0.2.0 && npm publish && git push --tags will create the git tag and publish to npm and GitHub.
You can customize the message like: npm version 0.2.0 -m 'Preparing 0.2.0 release'
I do releases on Github manually so I can write fancy release notes.
So @gaearon, the fancy release notes are on github only and not in any artifact in git, correct?
I'm used to maintaining a CHANGES file for this purpose which I can then automatically pull into the project's documentation, but I can get over this preference to fit the ecosystem better.
Yeah they're just Github only.
You don't have to do them manually. After publishing with the above commands, go visit the releases/tags section, https://github.com/faassen/reselect/tags, and create a new release where you can put the fancy release notes.
@wyze +1, that's what I'm doing
Additionally, with the npm version command you can provide it a version bump type rather than an absolute version, e.g., npm version patch. This still works with the message:
npm version patch -m 'Preparing %s release'
FWIW, here is the script I run in CI that checks for a release directive in the last commit message (e.g., release v+patch) and bumps, tags, and publishes if found - https://gist.github.com/SpainTrain/d4122936beec0da4639c
Closing due to inactivity. I'm basically doing what @wyze suggested.