-
-
Notifications
You must be signed in to change notification settings - Fork 479
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
Workflow Versions #771
Workflow Versions #771
Conversation
To prevent confusion, the workflow run for the commit above failed because the |
Not quite accurate, you can (and we arguably should in this case) have a version suffix, so you could do |
Marking as unready because of run number mismatch for the nuget workflow. @SamboyCoding |
You can only use SemVersion for NuGet packages (which I'm already doing btw), but not for assembly version |
If you want to see if you can integrate it into the main script I don't see the harm or an issue with that. |
Actually, I already did that + optimized/simplified the workflow. I would just have to push the changes |
I suggest testing the |
b15133b
to
f05c252
Compare
3c26264
into
LavaGang:alpha-development
Featuring automatically-generated versions for workflows.
Each workflow run has its own version which is appended to the title as follows:
[major].[minor].[patch]-ci.[run number] | [Commit title]
For example:
0.6.6-ci.1971 | Cleanup
The version is also automatically passed to the compiler, which sets the versions of the built assemblies and the nuget package.
(Because assembly and file versions only support 4 numbers, the format is
[major].[minor].[patch].[run number]
).To achieve this, I also wrote a new system for assembly metadata, which is stored in
Directory.Build.props
. I also removed the outdated assembly attributes.The indev version (major, minor and patch) should be stored as a repository variable, named
DEVVERSION
. An example value is0.6.6
. You can find this setting inRepo > Settings > Secrets and variables > Actions > Variables > Repository variables
.I also changed
BuildInfo.Version
into a dynamic property that grabs the version from the assembly. This also allows mods to get the accurate version of MelonLoader at runtime and not just compile-time. (Changing the constant field into a property won't break backwards compatibility because constants are never directly referenced.)To compile a non-prerelease build, you can build the project yourself. The version in
Directory.Build.props
will be applied.You can also make a non-prerelease build by running the
Build MelonLoader
andBuild NuGet Package
manually (thus not through a push).Let me know if I should change anything (and I apologize for the trash workflow code :( ).