-
Notifications
You must be signed in to change notification settings - Fork 0
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
Setup for publishing nugets to nuget.org. #5
Conversation
…s nuget validator). XML documentation is exempt.
- Don't include symbols in .nupkg
…verything after the first back tick is hidden in the job logs).
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.
Looks good,
Should probably consider down the line whether to reenable xml-documentation and symbol requirements, but that's a later concern.
Yeah, that was my thinking as well. The source code doesn't really have much XML-documentation, so I felt we could ignore that for now. The omission of symbol requirements is just me being lazy at the moment. I figured that since the original doesn't have that enabled, then 🤷 . I guess I'm lazy using Rider that has automatic decompilation and github source code mapping magic... |
This is a NuGet build work flow that is triggered on
main
When pushed to main and when PRs are made, the NuGets will be built and validated (using
Meziantou.Framework.NuGetPackageValidation
). When releases are published, the same workflow will be executed, but with an added step: the nuget is published tonuget.org
.During the build of the package, the workflow will check if the event is
release
and the ref name matches the formatn.n.n...
, that is a version triplet followed by anything. If that is the case, we will setup three environment variables to be used during the nuget build:VERSION
- will contain the version tripletFILE_VERSION
- will contain the version triplet, with an extra.0
component appended to it to match the .NET file/assembly version formatINFORMAL_VERSION
- will contain the github ref name (the name of the release)When the build is not for a release, the variables listed above will be set to:
VERSION
=0.0.0
FILE_VERSION
=0.0.0.0
INFORMAL_VERSION
=UNRELEASED
The push operation will assume that there is a secret named
NUGET_APIKEY
, and that will be used when pushing the package.