-
Notifications
You must be signed in to change notification settings - Fork 10
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
Auto-generate next version number when publishing NuGet packages (OSOE-400) #70
Comments
I'd recommend suffixing the marker tag with (at least) the issue code to avoid potential collisions, e.g., |
Related: #220 Ideally, the version number would be fully auto-generated, but I don't think it's possible to automatically decide between a minor and patch version (since that depends on whether the changes contain new features or only bugfixes), only whether it's a major version since it includes breaking changes. |
The best I can think of now is that an issue/PR can be labelled (to manually indicate what kind of changes are in the PR), so the workflow could use that information, but that information should also propagate somehow to default branch builds. |
Yeah, that's the original idea, I just added a note with some further thoughts. |
This is especially interesting if you're doing a lot of releases at once, like us releasing all of our Orchard Core-related projects during an OC upgrade. So, how about doing something for all projects at once too? I'm thinking about something like having a release manifest file in the OSOCE root, that defines the following:
Then, an automation would go through all the projects, starting at the bottom of the dependency graph, and take care of all releases:
Basically, automating https://lombiq.atlassian.net/wiki/spaces/DEV/pages/786857987/Managing+releases+of+open-source+projects#An-example-of-releasing-OSOCE-projects This might need to be something like a local script though, that utilizes the feature under this issue. |
FYI https://github.com/GitTools/GitVersion (some of our clients use it already). |
I have a hard time understanding what that tool does. It seems it manages the .NET version metadata, and I think it somehow can also determine the next version to use, but even after combing through the docs, I don't see how it does it and what happens once it determines a version number. |
See: Lombiq/Open-Source-Orchard-Core-Extensions#787 I've been thinking a bit on this issue and decided to go with a set of 3 local scripts versus creating a github action. I actually started with an action at first but then found out that it was too limiting and working with a 'marker tag' like for example vnext-major would also not be a good option because deleting a tag is quite strange sometimes and tags have to be unique. What it is now is a set of scripts that can and will call each other with the right input but don't have to and can also be used standalone. The first script Vnext is what was initially described in this issue. A script that determines the next version. Some examples:
This would determine the version number for a new major release of HelpfulLibraries, create the tag and push it out. Because of the
The changes for updating the version will not automatically be committed this should be a manual action, also we'd need to wait for the Nuget package to be pushed and available.
This would create a pre-release, in this case we don't have to set the This describes most of the main features but I'd create more thorough documentation for it later. Would love to get your thoughts and input on this |
Sounds interesting! I lost you after "which is where the other 2 scripts come in." though. What do you mean by "this will up the version for all of the projects that fall under this solution"? Or to put it otherwise, after you release HL with
Do these scripts do/will do something on steps 1-2 and 4-5? |
It does in a way, Once done you repeat the same process for UITT. So the proces would look like this:
UITT
Helpful Extension
Continue if needed. |
I see, great! Though with @Psichorex @sarahelsaig you did a lot of recursive releases lately, please check this and see how much it would've helped your workflow. |
Agreed, initially I was planning to also make it commit the changes but I thought having the option to review it and just make a commit yourself makes more sense and is more flexible. Will change the naming |
OK! |
I have made some changes to this, what makes most sense in terms of where to write the documentation for how to use these scripts. In a readme within the solution or on confluence or something else entirely? |
Most of it in a Readme, but link from and change the wiki page accordingly too. |
Added a Releasing.md file that outlines what/how to use the scripts. Added a link to it in the wiki Added an extra |
This was done for OSOCE in Lombiq/Open-Source-Orchard-Core-Extensions#787. |
In the
publish-nuget
action, optionally auto-generate the next version number for the following scenarios:x.0.0
).1.x.0
).1.0.x
).Manually added and
USE_GITHUB_REF_NAME
-generated version numbers should remain supported.Perhaps, this could be achieved still with tags: You push the
vnext-major
tag, the action removes that tag and adds one with the next major version generated. Or, we could use manually triggered workflows. Detecting an issue branch vsdev
could also trigger a behavior to publish an alpha version suffixed with the issue key in the branch.Publishes with a manually added version tag should remain an option. The version tags should also still be there in the repository, since we need those for tracking and correlating commits with GitHub releases.
Jira issue
The text was updated successfully, but these errors were encountered: