reselect icon indicating copy to clipboard operation
reselect copied to clipboard

a release script to tag on github, npm publish

Open faassen opened this issue 11 years ago • 8 comments

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

faassen avatar Jul 21 '15 13:07 faassen

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'

wyze avatar Jul 21 '15 13:07 wyze

I do releases on Github manually so I can write fancy release notes.

gaearon avatar Jul 21 '15 13:07 gaearon

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.

faassen avatar Jul 21 '15 13:07 faassen

Yeah they're just Github only.

gaearon avatar Jul 21 '15 14:07 gaearon

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 avatar Jul 21 '15 14:07 wyze

@wyze +1, that's what I'm doing

gaearon avatar Jul 21 '15 17:07 gaearon

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

SpainTrain avatar Oct 09 '15 20:10 SpainTrain

Closing due to inactivity. I'm basically doing what @wyze suggested.

ellbee avatar Dec 07 '15 13:12 ellbee