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

Creating a version action that versions the release based on PR logic #277

Merged
merged 8 commits into from
Jan 31, 2019

Conversation

jonrohan
Copy link
Member

This action updates the root package.json with a version number based on our primer workflow logic. After updating the version in package.json the actions down in the workflow will be able to read this number and publish/update packages.

Logic

  1. If the pull request branch begins with release- then treat that as a release candidate. Grab the version number from the branch name eg release-8.0.0 => 8.0.0. The version number will end up with a rc postfix and the commit short sha. eg. 8.0.0-rc.1cd4n78
  2. If the pull request isn't master and isn't a release- branch, then treat this as an alpha release. Using the current version number from package, it will bump it to a patch release and add a postfix of alpha and the commit sha. eg 8.0.0 => 8.0.1-alpha.1cd4n78

@shawnbot @emplums

Co-Authored-By: jonrohan <rohan@github.com>
@jonrohan jonrohan merged commit 745c8eb into github_actions Jan 31, 2019
@jonrohan jonrohan deleted the version_action branch January 31, 2019 19:03
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.

2 participants