[GH Actions] Update semantic versioning for Expensify.cash
See original GitHub issueUpwork posting: https://www.upwork.com/jobs/~011cb60c9e032b2c3b
If you haven’t already, check out our contributing guidelines for onboarding!
Problem
We use the following semver (semantic versioning) schema for Expensify.cash: MAJOR.MINOR.PATCH-BUILD
. Right now, the bumpVersion action only ever increments the BUILD
version, but we need to be able to increment other segments of the semver version, too.
Why is this important?
This is a requirement in order to deploy Expensify.cash mobile to production.
Solution
We need the following updates made to the existing bumpVersion
action:
- It should take a
SEMVER_LEVEL
input which must be one of: [MAJOR
,MINOR
,PATCH
,BUILD
] - Based on the
SEMVER_LEVEL
parameter, it must update the correct portion of the semver version. So if the current version were1.0.1-444
and I execute thebumpVersion
action w/ aSEMVER_LEVEL
ofBUILD
, the new version should be1.0.1-445
. - Whenever you update a higher
SEMVER_LEVEL
, the lower levels should be reset to 0. For example, if the the current version were1.0.2-444
and I execute thebumpVersion
action w/ aSEMVER_LEVEL
ofMINOR
, then the new version should be1.1.0
. - A
BUILD
level of 0 should not be included in the semantic version. So if the the current version were1.0.1-444
and I execute thebumpVersion
action w/ aSEMVER_LEVEL
ofPATCH
, then the new version should be1.0.2
, not1.0.2-0
. - We also need this action to output the new version string to the workflow that executes it.
- The maximum number for each
SEMVER_LEVEL
should be999
, and if the maximum is reached then it should automatically bump the next level up. For example, if the current version is1.0.999
and I execute this action w/ aSEMVER_LEVEL
ofPATCH
, then this action should update the version to1.1.0
, not1.0.1000
. - The existing functionality, which retries the
npm version
command in the event of a race condition/version conflict must be maintained. - Automated tests should be written to cover all the functionality of this action.
To be considered complete
- Verify that all 8 of the above are satisfied
- Document testing done for this action in a separate repo before we will merge a PR and QA it in Expensify.cash
- Provide a set of automated tests
- You must test that all build levels are updated as expected.
- Verify that the action still properly handles the npm version race condition that can occur if two or more PRs are merged in quick succession. You can test this by:
- Manually create a git tag in your repo for the highest existing version +1
- Execute this action, and if it bumps the version to the level of the tag you created in the previous step +1, then it was a success.
- Verify that the version generated by this action is successfully output to the workflow that executed it by echoing the version in the workflow.
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (7 by maintainers)
Top Results From Across the Web
[GH Actions] Update semantic versioning for Expensify.cash · Issue ...
This is a requirement in order to deploy Expensify.cash mobile to production. Solution. We need the following updates made to the existing bumpVersion...
Read more >DevOps: Automating Semantic Versioning Using GitHub Actions
A way to make version numbers more evocative is by using semantic versioning. The format of a semantic version number is MAJOR.MINOR.PATCH.
Read more >Tht - ALBA.Net
Empresario genival melo, 112 brabant nieuws veldhoven, Expensify apk free ... Xerafy xxs, Action movies 2015 youtube full movie, Ariadna gh 12+1 nuevo...
Read more >Gitiles - Code Review - GerritHub
Avoid writing scripts or custom code to deploy and update your applications? automate in a language that approaches plain English, ...
Read more >代码 Issues - Gitee
kakaka update readme a7939c9 4年前 ... [guide] Update license year ... It creates a version of the function that executes in the context...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks @parasharrajat
This issue is already resolved and thus should be closed.