jedisct1 / libsodium

A modern, portable, easy to use crypto library.
https://libsodium.org
Other
12.06k stars 1.72k forks source link

Rename `dotnet-core.yml` to `dotnet.yml` #1245

Closed MartyIX closed 1 year ago

MartyIX commented 1 year ago

This PR makes sure that .NET workflow is picked up by Github Actions in forks of this repo.

Experimentally verified by merging of https://github.com/MartyIX/libsodium/commit/01e21a5dae493b3bed6966adc8864cdd02cc5fef to my fork. See Actions here.

PS: .NET Core is no longer a thing. Basically Microsoft has been trying to unify Mono and .NET Core under the new simple name ".NET". So the change makes sense even from that point of view.

jedisct1 commented 1 year ago

I don't understand.

What does the name of a GitHub workflow change?

MartyIX commented 1 year ago

If somebody decides to fork https://github.com/jedisct1/libsodium here on Github and open https://github.com/<person>/libsodium/actions (as opposed to https://github.com/jedisct1/libsodium/actions) then the .NET Package is missing.

Having dotnet.yml fixes this because I belive that dotnet.yml is the new standard name for the .NET workflow file.

jedisct1 commented 1 year ago

I still don't get it. Files names for GitHub workflows don't change anything, do they?

Why would a special file name be required for workflows having something to do with .NET?

Maybe dotnet.yml is used in examples, but is there actual documentation mentioning that it is required? (so, why do other names still work perfectly fine?)

Unless this is a joke, I'd really like to understand why.

MartyIX commented 1 year ago

I still don't get it. Files names for GitHub workflows don't change anything, do they?

Obviously, they do. Otherwise, the .NET workflow would be picked up automatically in my fork.

Why would a special file name be required for workflows having something to do with .NET?

Presumably because there is a convention that maps various *.yml files to Github Actions worklows. There are many different workflows.

Your dotnet-core.yml file was likely registered by Github itself at the time when .NET Core was the main .NET branding but since it was renamed it's not picked up by new forks.

Maybe dotnet.yml is used in examples, but is there actual documentation mentioning that it is required? (so, why do other names still work perfectly fine?)

I have found only this https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net#using-the-net-starter-workflow and it only implicitly leads to adding a starter file: https://github.com/actions/starter-workflows/blob/main/ci/dotnet.yml

So no, it does not seem to require it but also I can't "discover" dotnet-core.yml in my fork using Github UI. And I really tried.

Unless this is a joke, I'd really like to understand why.

I spent an hour or two playing with it. Anyway, obviously it's a joke to you so I won't bother you with it anymore.

jedisct1 commented 1 year ago

That workflow only runs on the stable and next branches.

Isn't it actually why it doesn't run in your fork? It doesn't run on that repository either for the master branch.