-
Notifications
You must be signed in to change notification settings - Fork 162
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
Publish release branch to npm via Travis #660
Conversation
All that NPM needs is a NPM_TOKEN that can be obtained via the website. This was set as an environment variable in Travis. With this in place, publishing is just "npm publish"
I prefer not to use automated publishing, as it doesn't let you manually inspect the dist artifacts or test them locally before they're published. I find this useful, for example, when changing metadata or ignore files (i.e. seeing what files go into the dist) so I can see the generated package metadata or testing changes to the release process itself. These same reasons are why the git refs aren't pushed automatically too. (For augur and the CLI, would it be more palatable to bundle up the |
Upon re-reading, I'll also note:
This is pretty easily remedied if it happens; the consequences aren't high. I don't think the incidence will be very high either.
I would think this would be run automatically from the release script or the publish script. (The equivalent in augur and the CLI are, for example.) |
(One more thing: a (small) benefit of publishing releases from our local workstations is that the NPM registry will actually record who uploaded each release, instead of it being the owner of the API key configured for Travis.) |
Deploying auspice to nextstrain.org should, in my opinion, also publish to npm. |
Mmm. I see it inverted from that, in a way. Nextstrain.org should, IMO, run a published version of auspice, but I see publishing auspice as separate from deploying to nextstrain.org conceptually. The distinction is maybe less clear when it's just us and nextstrain.org, but it makes more of a difference as there are other folks running auspice servers (which we aim to encourage, I think). |
We are currently focused on developing auspice for nextstrain.org, so I believe this PR is the correct direction. In the future, if we decide to change how auspice is "released" (and what this even means), these processes can change. |
I think the nuance of my point about nextstrain.org vs. auspice was lost, probably because of a bad job of explaining it on my part. I started to re-explain it… but it doesn't really matter. For auspice, do what you and Trevor think is right. |
Hmm.... I see your points Tom about releasing to PyPI. I think with this PR, it's actually a question of how James would prefer to keep up with auspice releases to NPM. He's the person doing releases for the most part. I'm happy to have this merged or closed as preferred. |
Great. Thanks for both of your input. Perhaps it's good for me to briefly summarise the current release flow (after this PR goes in): Running
|
All that NPM needs is a
NPM_TOKEN
that can be obtained via the website (see here). This was set as an environment variable in Travis. With this in place, publishing is justnpm publish
. I appended this to the end of the set of commands that's run on successful build of therelease
branch.You can see it working here: https://travis-ci.com/nextstrain/auspice/builds/83951647#L580
@jameshadfield: I struggled with the getting the
deploy
statement of Travis CI to work previously and ended up preferring simple shell commands.@tsibley: I see that both augur and CLI require you to manually run
twine upload dist/*"
. I thought better to make this as automated as possible here so we won't forget to publish and make sure we remember to runnpm run build
before every publish event. Do you see a problem with this? Otherwise, I'd think to move thetwine
calls to Travis as well.