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

⚠️ GitHub release failed with status: 422 undefined #429

Closed
yektasarioglu opened this issue Mar 29, 2024 · 6 comments
Closed

⚠️ GitHub release failed with status: 422 undefined #429

yektasarioglu opened this issue Mar 29, 2024 · 6 comments

Comments

@yektasarioglu
Copy link

Suddenly, I got this 422 undefined error once again.

      - name: Create Github Release
        uses: softprops/action-gh-release@v2
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          tag_name: ${{ env.LATEST_GIT_TAG }}
          generate_release_notes: true
          files: web/backend/build/libs/backend.jar
image

Any ideas? Thank you.

@andrespayclip
Copy link

Having the same issue with the softprops/action-gh-release@v0.1.15 version

@HienLeGcx
Copy link

HienLeGcx commented Apr 2, 2024

After I upgraded from softprops/action-gh-release@v1 to softprops/action-gh-release@v2, I also got this error:

      - name: Create GitHub release
        uses: softprops/action-gh-release@v2
        with:
          name: Dev Release ${{ steps.version.outputs.version-name }}
          prerelease: true
          files: "**/app/build/outputs/apk/dev/release/**"
          fail_on_unmatched_files: true
          generate_release_notes: true

Screenshot 2024-04-02 at 15 12 25

@softprops
Copy link
Owner

hrm I'm expecting the response errors printed in the errors above

}\n${JSON.stringify(error.response.data.errors)}\nretrying... (${
but I'm seeing undefined. typically github provides error information to help inform why the response failed. One step wise improvement I could make is to try and dump the entire response so that we can see exactly what is causing the 422

@HienLeGcx
Copy link

After I upgraded from softprops/action-gh-release@v1 to softprops/action-gh-release@v2, I also got this error:

      - name: Create GitHub release
        uses: softprops/action-gh-release@v2
        with:
          name: Dev Release ${{ steps.version.outputs.version-name }}
          prerelease: true
          files: "**/app/build/outputs/apk/dev/release/**"
          fail_on_unmatched_files: true
          generate_release_notes: true

Screenshot 2024-04-02 at 15 12 25

Another note from my side, althogh the Create Github release action runned into error, it succeeded creating a new Github release 😅.

@iamKunal
Copy link

iamKunal commented Apr 8, 2024

If you have generate_release_notes and getting 422 double check your .github/release.yml and its structure. I had the same issue.

@yektasarioglu
Copy link
Author

I was about to write the same thing as @iamKunal suggested. The issue seems to happen due to the incorrect indentation of the .github/release.yml file. Thanks to IntelliJ, it took me awhile to figure it out 😅.

image
image

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

No branches or pull requests

5 participants