Skip to content
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

Add npm as a deployment provider to travis #565

Merged
merged 1 commit into from Oct 30, 2017
Merged

Conversation

Elchi3
Copy link
Member

@Elchi3 Elchi3 commented Oct 27, 2017

I followed the steps here https://docs.travis-ci.com/user/deployment/npm/
(basically, I just did $ travis setup npm)

With this, everyone with push access should be able to push a new tag, for example like this:

$ npm version patch -m "12th alpha version"
$ git push --tags

And then this should:

  1. add a new commit to master updating the version in package.json,
  2. add a new tag, like "v0.0.12" to the repo,
  3. trigger travis to react on the new tag and to publish version 0.0.12 to npm.

@Elchi3 Elchi3 added the infra 🏗️ Infrastructure issues (npm, GitHub Actions, releases) of this project label Oct 27, 2017
@Elchi3 Elchi3 requested a review from jwhitlock October 27, 2017 13:28
Copy link
Contributor

@jwhitlock jwhitlock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 looks easy enough, just one change to avoid deploying with every merge to master.

.travis.yml Outdated
secure: tPV4Rve++cmJeYOEhB0/bYaUVIxx9fyKm3Nn4mEBoTuqUojxCzjYaRNqhCREUigQayKDd6Efa6tzHbTygyU41WUNRLtRYENqv060nj8Bdzx7bjgm8dRqdctrvgisfqBfuQa+5MbliZblhD6M7ZyoURqK2stY64JGhvonKG1w0zl2sVyhDNSzoJwx6dx57upkVvXFqk4PQtmtLxRc27YlEiPa7yUCkXYUVCrQVQst7iJfR3pOvvfsR3lhyCJqVrV7cFgTy1VmpxHK/PjbVMJx4JahLbDHbS1I+jRWwx8/aPKMuQfoDn+34Y6uqVe+NaAwoy7bppsKOx/hpAY9HNfLBjIk8oe2n1JXmQg9J8bQ4sIijn1uflcly+LD2FYJSqtkHSsTSTiGHSH6+0O79tYcFRp3E62Xq+ED4Bx4h44Il4W9Z9ggrU4Lcp5BzNGgwf76U6V/Gx/vgd4BmiyDV/7+1MrHJxM67P/5rNAD+fdYQ6Hh5d7765ljBT4ttokoyhgKhEA5ShjPVt+ubotbgJ7ixY72O926qEAvQ7n74dEd4vnGXp2cO/h2dEPAstENY1xeuMyT4fz2CZ/zCr6xEZ9vkevPSFXoHdk2BzrFKLhelBZw9VqmD5RSwhR4/6dB4VxMWB79QACdHslMCWkFVgiFWTuAa4Prmd7J6E5B03dtHd4=
on:
tags: true
branch: master
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe branch: master says to release with each merge to master. Please remove this line and just leave the tags one.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I think I misunderstood the docs.

.travis.yml Outdated
provider: npm
email: mdn-npm@mozilla.com
api_key:
secure: tPV4Rve++cmJeYOEhB0/bYaUVIxx9fyKm3Nn4mEBoTuqUojxCzjYaRNqhCREUigQayKDd6Efa6tzHbTygyU41WUNRLtRYENqv060nj8Bdzx7bjgm8dRqdctrvgisfqBfuQa+5MbliZblhD6M7ZyoURqK2stY64JGhvonKG1w0zl2sVyhDNSzoJwx6dx57upkVvXFqk4PQtmtLxRc27YlEiPa7yUCkXYUVCrQVQst7iJfR3pOvvfsR3lhyCJqVrV7cFgTy1VmpxHK/PjbVMJx4JahLbDHbS1I+jRWwx8/aPKMuQfoDn+34Y6uqVe+NaAwoy7bppsKOx/hpAY9HNfLBjIk8oe2n1JXmQg9J8bQ4sIijn1uflcly+LD2FYJSqtkHSsTSTiGHSH6+0O79tYcFRp3E62Xq+ED4Bx4h44Il4W9Z9ggrU4Lcp5BzNGgwf76U6V/Gx/vgd4BmiyDV/7+1MrHJxM67P/5rNAD+fdYQ6Hh5d7765ljBT4ttokoyhgKhEA5ShjPVt+ubotbgJ7ixY72O926qEAvQ7n74dEd4vnGXp2cO/h2dEPAstENY1xeuMyT4fz2CZ/zCr6xEZ9vkevPSFXoHdk2BzrFKLhelBZw9VqmD5RSwhR4/6dB4VxMWB79QACdHslMCWkFVgiFWTuAa4Prmd7J6E5B03dtHd4=
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was surprised this was inserted into .travis.yml - I was expecting a server-side secret, such as https://www.npmjs.com/package/travis-deploy-example. But, this is what travis setup npm spits out, so I assume it is correct.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added NPM_TOKEN as an environment variable to the travis repo settings now.

@jwhitlock
Copy link
Contributor

Thanks for the updates! Let's try it for the Monday update 😬

@jwhitlock jwhitlock merged commit 5d3ec57 into master Oct 30, 2017
@jwhitlock jwhitlock deleted the travis-packaging branch October 30, 2017 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra 🏗️ Infrastructure issues (npm, GitHub Actions, releases) of this project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants