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 task to publish to npm #13

Open
devpaul opened this issue Apr 27, 2017 · 2 comments
Open

Add task to publish to npm #13

devpaul opened this issue Apr 27, 2017 · 2 comments

Comments

@devpaul
Copy link
Member

devpaul commented Apr 27, 2017

As an engineer, it would be nice to have a way to instruct Travis automatically publish to npm or to publish locally using an automated process.

An automated publish could be triggered by committing to master w/ [npm-publish] in the commit message. The system would then validate the commit, check that version in package.json is valid and not marked w/ -pre, and that the version is not already published to npm.

The process would look something like this:

  • prompt for npm credentials (if running locally)
  • assert no changed files in git
  • check package.json's version
    • no -pre tag
    • version isn't already published on npm
    • new version is the latest version
  • publish to npm
  • a tag is added to git using the released version
  • the version in package.json is incremented and a -pre tag is added
  • the new package.json is committed and pushed w/ the tags
  • (optional) the commit information from the previous release is displayed (for release notes)
  • (optional) the new release is tagged using the GitHub APIs and the above commit information is used

NOTE: Doing a GitHub release requires OAuth credentials for GitHub, which would provide access to all repositories, so we may want to consider automating release notes as a separate feature.

@matt-gadd
Copy link

matt-gadd commented Apr 28, 2017

might be worth looking at grunt-dojo2's release task, which we use for releasing our @dojo packages. it would be good to merge efforts and have one release tool. the current task is basic but it does the following (locally):

  • checks credentials for publishing
  • checks the branch is clean
  • versions by the dojo 2 versioning standards (git tags and npm)
  • publishes to npm
  • pushes back updated meta (package.json) to git remote if available
  • supports dry runs

@dylans dylans added this to the 2017.05 milestone Apr 29, 2017
@eheasley eheasley modified the milestones: 2017.05, 2017.06 Jun 6, 2017
@dylans dylans modified the milestones: 2017.06, 2017.07 Jul 4, 2017
@dylans dylans modified the milestones: 2017.07, 2017.08 Jul 29, 2017
@kitsonk kitsonk modified the milestones: 2017.08, 2017.09 Sep 4, 2017
@kitsonk kitsonk modified the milestones: 2017.09, long-grass Oct 10, 2017
@kitsonk
Copy link
Member

kitsonk commented Oct 10, 2017

This would be a nice to have (and daily publish) when we refactor our release process. Moving under that epic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants