gomplate / gomplate-npm

Install gomplate using npm!
https://gomplate.ca
MIT License
7 stars 1 forks source link

Add TravisCI integration #2

Closed RecuencoJones closed 5 years ago

RecuencoJones commented 5 years ago

@hairyhenderson, could you please enable TravisCI integration for this repo?

That way we can automate releasing older and future versions, we will need a GitHub token as well as an npm token for publishing (GITHUB_API_KEY and NPM_TOKEN as Travis environment variables).

hairyhenderson commented 5 years ago

Oh! sorry, I totally meant to do that earlier 😬...

hairyhenderson commented 5 years ago

@RecuencoJones I've set up Travis and added NPM_TOKEN, but I'm not sure I totally understand what the GITHUB_API_TOKEN is for... will read the code a bit more to see if I can figure it out.

Thinking a bit more about this, I'm not totally convinced that this repo even needs CI - publishing only really needs to be done when I release new versions, and I have a script I use (not yet in GitHub) to build and release all the different packages. One advantage of doing the npm publish manually is I can increase security by requiring a 2FA token, which is what I like to do for the rest of my npm modules...

RecuencoJones commented 5 years ago

GITHUB_API_KEY is used in releases.js script to fetch all existing releases of gomplate and publish them to npm, as each release has to be mapped to a version of the npm package.

If we want to skip that and only publish the new releases, we can skip the whole TravisCI integration and even remove that script.

If you prefer it this way, I'll raise a PR in a while removing these files and updating the Readme 😄

hairyhenderson commented 5 years ago

@RecuencoJones thanks - I think that's simpler 😉