-
Notifications
You must be signed in to change notification settings - Fork 63
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
Revised/Enhanced Branch Support #76
Comments
That would be great. I just tried to use semantic-version to determine the SemVer on a support branch ( Best regards. PS: Guess I took this wrong. It should automatically check that branch when choosing it for the workflow, right? |
For anyone interested in this, it would be helpful to share specifics of your use case. Here is the behavior I'm considering now to be "default" branch behavior:
From this point on the action would follow the normal flow as if the version and commit had been determined by a tag. Here we'd consider only the branch that is currently checked out explicitly, and not attempt to do anything like the previous two iterations of behavior of discovering arbitrary branches. The reason for this is that branches can move, and without some explicit rules that you enforce on merging version branches it is not possible to determine the correct branch to use in a number of fairly common situations. There is still a possibility of running into issues if you at some point merge a commit which is tagged for a later version into the version branch. To address this, I'm considering also including a mask, so that version tags on a branch would be excluded if they changed either the major or minor version number. I think that this may be good enough to cover any supported use case without any additional branching strategies. If you are doing this today and interested into this feature, please share your feedback. |
I'm trying to figure out if and how I could setup something like the following:
I want to use this version scheme for a SaaS product to track which version includes which JIRA tickets. I understand that this isn't strictly semver but the hypothesis is that any changes to Does this use case make sense to you and a) is this achievable with the current version of this action, b) if not then is this something to be considered for the next major update? Update: Just answered my first question: Yes, that is possible with the current version and works pretty much out of the box by using different |
Version 5.1.0 has just been released without this enhancement which was originally planned to be included. As mentioned above this needs some more definition, the edge cases are complicated and there needs to be some opinionated decisions made to resolve them. I have started and included a guide document which is planned to eventually describe a number of different branching/versioning modes and perhaps reference example projects. If you have a clear strategy working that you can contribute, it would be helpful to add it to this thread. |
After a lot of consideration I think that using branches alone is fundamentally unviable without greatly increasing the complexity of the configuration to the point it would probably not get used. Branch commits are not fixed to a specific commit and as such do not provide sufficient information to determine the version. For this feature, a new mode will be added that uses a combination of branch name and tag name. The intended use case for branches is when you want to release a version of a product, but continue to provide ongoing releases to that version after the next major version is released. E.g. a product such as a desktop application where you may ship version v3.7.6 first, then v4.0.0, put continue to provide ongoing updates to the v3 version. If you are releasing something like a web application running only a single instance or mobile app where there is only a single timeline of releases and older versions do not get updated, you should stick to tags. I believe the vast majority of modern applications will not need this. Having said that, the plan for this is as follows:
Setting the new option, the major and optionally minor version will be taken from the branch name, while the patch and minor (if not taken from the branch name) will continue to come from tags. Tags for versions that do not match the version taken from the branch name will be ignored. For example, you create a new branch, Similarly you could name the branch If |
Available in |
In version 5.1.0 support branch-based versioning will be revisited, possibly multiple versioning strategies will be supported.
This ticket will serve to organize the design for this change, feedback and ideas are welcome.
The text was updated successfully, but these errors were encountered: