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

Autorelease @next tag on master commits #147

Closed
bilby91 opened this issue Sep 25, 2017 · 10 comments
Closed

Autorelease @next tag on master commits #147

bilby91 opened this issue Sep 25, 2017 · 10 comments

Comments

@bilby91
Copy link
Contributor

bilby91 commented Sep 25, 2017

I create this issue to follow the conversation in #143

The idea would be the following. Every time a new stable release is created. We need to dump the version to the release with beta. So, lets say that we just published 0.6.0. After that publish we need to create a new commit that changes the version to 0.7.0-beta.

When that commit is merged into master, CI will do the following:

- git config --global -l
- git config --global user.email circleci@suttna.com
- git config --global user.name CircleCI
- npm version prerelease # (This will bump version to 0.6.0-beta.0, 1, 2, etc) 
- npm publish --tag next # (Tag the version with next so that users can do `npm install sequelize-typescript@next`
- git push --follow-tags # (Push version bump to master with tags)

For doing this, the ssh key that is in travis should have write access to the repo. Maybe we can follow this conversation in another commit.

@RobinBuschmann
Copy link
Member

Hey @bilby91 , thank you for preparing this. This week I don't have time to look into this and give any feedback.

@bilby91
Copy link
Contributor Author

bilby91 commented Sep 29, 2017

@RobinBuschmann No problem! Let me know! The setup above is working nice for me at the moment so I think it will work!

@RobinBuschmann
Copy link
Member

Hmm, until now I've tagged the *-beta.* releases with --tag beta, but I think you're right, --tag next seems to be best practice - especially to make install ...@next possible.

One question is left from my side: What needs to be done to give travis permission to publish to npm? Is setting the NPM_TOKEN as environment variable enough to achieve this?

@bilby91
Copy link
Contributor Author

bilby91 commented Oct 7, 2017

@RobinBuschmann Great!

Yes, NPM_TOKEN should be available as an environment variable. You can take a look here for a simple example https://github.com/suttna/botbuilder-slack/blob/master/circle.yml. This is CircleCI implementation but it should be pretty similar.

@jbender
Copy link

jbender commented Oct 10, 2017

FWIW here are the docs: https://docs.travis-ci.com/user/deployment/npm/

You'll want to add

deploy:
  provider: npm
  email: "YOUR_EMAIL_ADDRESS"
  on:
    branch: master
  tag: next

then add your encrypted token:

travis encrypt YOUR_AUTH_TOKEN --add deploy.api_key

@RobinBuschmann
Copy link
Member

@jbender thanks for your input :) but as stated here #143 (comment), I will configure it in a different way

@RobinBuschmann
Copy link
Member

@bilby91 This npm version prerelease only increases *-beta.x, right? So the new upcoming versions has to be set manually or do I overseen something?

@bilby91
Copy link
Contributor Author

bilby91 commented Oct 16, 2017

@RobinBuschmann Yep, that is correct. To move to next version a new commit with the bump change needs to be done. Just that

@RobinBuschmann
Copy link
Member

@bilby91 Can this be closed on favor of #202?

@bilby91
Copy link
Contributor Author

bilby91 commented Nov 26, 2017

Yes! Make sense. Closing!

@bilby91 bilby91 closed this as completed Nov 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants