neoforged / MDK

The Mod Developer Kit - this is where you start if you want to develop a new mod
https://github.com/NeoForgeMDKs
183 stars 60 forks source link

Build action failing when creating a release #39

Closed jameswolff96 closed 4 months ago

jameswolff96 commented 5 months ago

I just created the first release for a new mod that I created using the MDK and when I did so the Build action failed, this seems to be a known issue with the checkout action (actions/checkout#1471).

I did some testing and it seems to only be an issue when the checkout is run on a tag (for example during a release) Each of the logs here and here are run against the same code, the only difference being that the second one is run against a tag during a release. As several comments on the issue above suggests changing fetch-depth to 0 solves the issue, though it can apparently cause slowdowns for larger projects.

Technici4n commented 5 months ago

I don't know about this. One possible fix is to make a github release instead (e.g. https://github.com/AztechMC/Modern-Industrialization/blob/1.20/.github/workflows/release.yml).

jameswolff96 commented 5 months ago

In the example you provided you are using checkout@v2 rather than v4, I created a release.yml in my test project using v4 and it still fails, however changing to checkout@v2 and removing the with clause it does succeed