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

Added check if tag include rc init, if so release as @next #1407

Merged
merged 2 commits into from
May 21, 2024

Conversation

avifenesh
Copy link
Member

Added option of release candidate to the CI.
If a tag including 'rc' in it it will set the publish tag to next, so it won't be install without specific direction.

To my understanding from https://pythonpackaging.info/07-Package-Release.html pypi automatically set version with -rc in their version as prerelease version.
@barshaul @shohamazon please check if i got it right.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@avifenesh avifenesh requested a review from a team as a code owner May 13, 2024 17:28
@Yury-Fridlyand Yury-Fridlyand added the CI CI/CD related label May 13, 2024
Copy link
Contributor

@barshaul barshaul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we set all RCs with the same next tag, how can we release a new RC if there's one already exist?

.github/workflows/npm-cd.yml Outdated Show resolved Hide resolved
.github/workflows/npm-cd.yml Outdated Show resolved Hide resolved
.github/workflows/npm-cd.yml Outdated Show resolved Hide resolved
@avifenesh
Copy link
Member Author

If we set all RCs with the same next tag, how can we release a new RC if there's one already exist?

@barshaul
Every time you release with next you override. Same of what happen with latest, every time there is new latest, the previous loses its tag.

@barshaul
Copy link
Contributor

If we set all RCs with the same next tag, how can we release a new RC if there's one already exist?

@barshaul Every time you release with next you override. Same of what happen with latest, every time there is new latest, the previous loses its tag.

So in your solution the user passes the version with the RC number, right? and if the user passes an existing RC it would fail the workflow?
Have you though of using npm's preid field?
https://docs.npmjs.com/cli/v10/commands/npm-version#preid
so running:
npm version prerelease --preid=rc
would add a suffix of the right "rc-X" to the package version

Copy link
Contributor

@barshaul barshaul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See if using preid can be better for use to use as it would enforce the right suffix, maybe by having two github tags for RC - one with the version and another with RC, to differentiate it from an actual release

@avifenesh avifenesh merged commit cf8301c into main May 21, 2024
14 checks passed
@avifenesh avifenesh deleted the CI/Feature/publishRC branch May 21, 2024 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI CI/CD related Feature node python testing tools Dev tools and utils
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants