-
Notifications
You must be signed in to change notification settings - Fork 15
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
New release strategy #82
Conversation
@xebia-functional/team-ai Ready for review |
if [[ $1 == alpha-* ]] | ||
then | ||
echo "stage=alpha" >> "$GITHUB_OUTPUT" | ||
echo "scope=$(echo "$1" | sed 's/alpha-\(.*\)/\1/')" >> "$GITHUB_OUTPUT" | ||
else | ||
echo "stage=$1" >> "$GITHUB_OUTPUT" | ||
echo "scope=auto" >> "$GITHUB_OUTPUT" | ||
fi |
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.
Nit: is there any way to do this in Gradle? 🤔 We could pass ${{ github.event.inputs.stage }}
as an Gradle property to the build.
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.
Probably, yes. I tried it, but I need to get more familiar with Gradle to create custom tasks
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.
We can take care of it later. It's a bit confusing how to create tasks, sadly it's a lot more complex than just registering a Kotlin function with a Gradle task name 😭
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.
Thank you @franciscodr! 🙌
Looks good to me, just a couple of nits but nothing critical, or blocking
This pull request proposes a new release strategy for the library based on a semantic versioning approach.
The version of the library will be one of these four stages:
alpha
,beta
,rc
, andfinal
Every push to the main branch will increase the stage number of the version by one, except for final versions (to avoid unexpected releases of final versions). Some examples of this strategy:
0.0.1-alpha.1
->0.0.1-alpha.2
0.0.1-beta.4
->0.0.1-alpha.5
0.0.1-rc.2
->0.0.1-alpha.3
0.0.1
-> it remains unchangedCreating the tag for this new version will trigger a GitHub Actions workflow to publish the artifacts in Sonatype.
Create version tags manually
When we want to change the stage of the version or the version itself, we will have to run the
Create version tag manually
workflow. This workflow has several options depending on what we are aiming for.Create a new version
If the current version is final, and we want to start a new development cycle, we have three different choices:
alpha-major
:0.0.1
->1.0.0-alpha.1
alpha-minor
:0.0.1
->0.1.0-alpha.1
alpha-patch
:0.0.1
->0.0.2-alpha.1
Change the stage of the current version
If we want to change the stage of the current version, there are also three different options:
beta
:0.0.1-alpha.3
->0.0.1-beta.1
rc
:0.0.1-alpha.2
->0.0.1-rc.1
final
:0.0.1-alpha.2
->0.0.1