Skip to content

Conversation

@andreiborodin
Copy link
Contributor

@andreiborodin andreiborodin commented Nov 21, 2019

I would like to use the same NPM pipeline to build and push release package, for that I want to increment the versions only on master branches.

@ryantrem
Copy link
Member

Is the idea here that you would create a release branch and manually set the full version, and then release out of this branch?

@andreiborodin
Copy link
Contributor Author

Yes. Let's say we just released version 0.8.0, here is the workflow:

  • Master package.json still says 0.8.0
  • Every build on master invokes npm version which will increment the patch and add prerelease, so 0.8.1-11202019.1
  • We decide that we are ready to release 0.9.0, we update master to 0.9.0, builds go to 0.9.1-11202019.1
  • We branch to release, and build the 0.9.0 package

This way, master will always be ahead of any release as the release is based on current checked-in version.

@andreiborodin andreiborodin merged commit 3c1a263 into master Nov 21, 2019
@andreiborodin andreiborodin deleted the build/incrementOnlyOnMaster branch November 21, 2019 00:56
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

Successfully merging this pull request may close these issues.

3 participants