Enums.NET icon indicating copy to clipboard operation
Enums.NET copied to clipboard

Improve build and publish workflow

Open lahma opened this issue 1 year ago • 6 comments

  • ensure proper flags for package
  • generate symbols
  • package and publish as part of CI flow

Old: https://nuget.info/packages/Enums.NET/5.0.0

Now:

image

When uploading to NuGet should also upload the snupkg file.

lahma avatar Aug 09 '24 12:08 lahma

Thanks @lahma for doing this. Sorry I'm not too familiar with artifacts, what's the purpose for them in the CI build script?

TylerBrinkley avatar Aug 09 '24 14:08 TylerBrinkley

If you approve the run, you will see artifacts section in build summary and you can download a zip file containing the nuget packages prepared.

lahma avatar Aug 09 '24 15:08 lahma

I did similar thing here, see the bottom of the page https://github.com/totpero/DeviceDetector.NET/actions/runs/10267431264

lahma avatar Aug 09 '24 15:08 lahma

I see, but wouldn't I want to do that for just version releases? How long do these artifacts exist? Would this support signing the assemblies?

TylerBrinkley avatar Aug 09 '24 15:08 TylerBrinkley

Well you can pick artifacts from build you choose, e.g. the commit you choose for release. With Quartz.NET and a some other projects I have generated rolling preview version number and if it's a tagged build it will produce version based on tag name. But it gets complicated.

In my projects I have signing key in repo and all builds have signed binaries.

My goal with this PR was to ensure that build artifacts correlate to repository and there won't be possible problems from building on random developer box with code not in version control.

lahma avatar Aug 09 '24 15:08 lahma

As I was on mobile before so wasn't able to investigate. So I see that you don't share the snk file for signing. I would suggest to just add it publicly to repository and have it for all builds. If you look at the Microsoft's guidance, there's:

✔️ CONSIDER strong naming your library's assemblies. ✔️ CONSIDER adding the strong naming key to your source control system.

As it's not a security measure it's common for OSS projects to have the key as part of repository contents.

lahma avatar Aug 10 '24 05:08 lahma