-
-
Notifications
You must be signed in to change notification settings - Fork 926
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Travis for npm publishing #1538
Conversation
Also added a few more comments
Not quite working, since the build output didn't change it looks like Travis doesn't actually run the Here's the build that "worked" but stopped running, https://travis-ci.org/lhorie/mithril.js/builds/191845435 |
It was due to my "early out" calling |
@lhorie just a heads-up. I believe this is fixed as of 59dfbf0, sorry about that. BASH scripting isn't something I have a ton of experience with so it takes a bit of flopping around usually. I don't want to bump the version again & re-publish because both So this code will just hang out, and we'll need to remember to use |
Thanks @tivac I think we should add the release process somewhere more official so we don't need to search back for this PR |
Agreed, will document tonight. I think I can also have Travis amend the previous commit so I can remove the need for the locally built copy. Gonna play with that in another repo first though. |
New release process:
npm version <type-of-change or new version> -m "v%s"
Everything else is fully automated, here's what will happen.
package.json
is incrementedgit add
called on bundle outputpackage.json
and updated bundles are committed to gitgit push --follow-tags
pushes up new version commit & tag to github.travis.yml
to publish a new version to npm😩 phew, that's a lot of work that a human never has to do again. This is basically the process I use to release most of the packages I maintain on npm and it's super nice to not really have to think about it. So long as you use
npm version
(the-m "v%s"
isn't required but looks nicer as a tag name IMO) everything else just goes w/o much effort.There's a little bit of duplicated effort between the local process and travis, it's mainly to ensure that the commit tagged
v1.0.0-rc.8
actually points to the commit that bumpedpackage.json
andm.version
inmithril.js
/mithril.min.js
to the new version. Otherwise there'd be a weird mismatch that I think people would find confusing.