-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add tagging feature to npm publishing #492
Conversation
Signed-off-by: Sayali Gaikawad <[email protected]>
Signed-off-by: Sayali Gaikawad <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #492 +/- ##
=========================================
Coverage 84.32% 84.32%
Complexity 80 80
=========================================
Files 108 108
Lines 523 523
Branches 61 61
=========================================
Hits 441 441
Misses 26 26
Partials 56 56 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Sayali Gaikawad <[email protected]>
Signed-off-by: Sayali Gaikawad <[email protected]>
@@ -45,3 +46,10 @@ void parameterCheck(String publicationType, String artifactPath) { | |||
error('publicationType: github does take any argument with it.') | |||
} | |||
} | |||
|
|||
String getNpmTag(String githubTag) { | |||
def matcher = githubTag =~ /-(\w+)\./ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you explain what exactly are you trying to match with examples for beta tag and latest tag?
Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anything after -
in the version number. package.json has a version syntax of 1.0.0-beta.1
or 1.0.0
So just grabbing the same. If there is nothing after major.minor.patch, it defaults to latest
I'll test this on my own npm package before merging this. |
Signed-off-by: Sayali Gaikawad <[email protected]> (cherry picked from commit d88c840) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Description
Add tagging feature to npm publishing. Synced up with @nhtruong offline and confirmed the version syntax for npmjs. Will be parsing the GH tag pushed for tagging the release. Defaults to latest.
Issues Resolved
closes #206
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.