Skip to content
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

Build action failing when creating a release #39

Closed
jameswolff96 opened this issue Feb 20, 2024 · 2 comments · Fixed by #40
Closed

Build action failing when creating a release #39

jameswolff96 opened this issue Feb 20, 2024 · 2 comments · Fixed by #40

Comments

@jameswolff96
Copy link
Contributor

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.

jameswolff96 added a commit to jameswolff96/MDK that referenced this issue Feb 20, 2024
Change fetch-depth to 0 on the checkout action closes neoforged#39
@Technici4n
Copy link
Member

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
Copy link
Contributor Author

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

Shadows-of-Fire pushed a commit to Shadows-of-Fire/MDK that referenced this issue Mar 13, 2024
* Update build.yml

Change fetch-depth to 0 on the checkout action closes neoforged#39

* Update setup-java and gradle-build versions

actions/setup-java@v2 -> actions/setup-java@v4
gradle/gradle-build-action@v2 -> gradle/actions/setup-gradle@v3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants