softprops / action-gh-release

📦 :octocat: GitHub Action for creating GitHub Releases
MIT License
4.1k stars 450 forks source link

Release is created but action fails #369

Closed caquino closed 1 year ago

caquino commented 1 year ago

Hi,

I'm using this action in one of my workflows, and I'm seeing an error that I'm unsure how to debug.

Run softprops/action-gh-release@v1
  with:
    fail_on_unmatched_files: false
    generate_release_notes: true
    files: **/target/**/**.rpm
  **/target/**/**.jar
  **/launcher/**/**.rpm
  **/launcher/**/**.jar
  pom.xml

    token: ***
  env:
    JAVA_HOME: /home/ec2-user/actions-runner/_work/_tool/java/17.0.0/x64

👩‍🏭 Creating new GitHub release for tag v10.0.0-ft.alpha.10...
⬆️ Uploading khojq-service-10.0.0~ft.alpha.10-3.noarch.rpm...
⬆️ Uploading khoj-query-engine-application-10.0.0-ft.alpha.10.jar...
⬆️ Uploading component-tests-10.0.0-ft.alpha.10.jar...
⬆️ Uploading khoj-query-engine-launcher-10.0.0-ft.alpha.10.jar...
⬆️ Uploading khojq-service-10.0.0~ft.alpha.10-3.noarch.rpm...
⬆️ Uploading khoj-query-engine-launcher-10.0.0-ft.alpha.10.jar...
⬆️ Uploading pom.xml...
Error: Failed to upload release asset khoj-query-engine-launcher-10.0.0-ft.alpha.10.jar. received status code 404
Not Found
undefined

Even with this failure, the release is created, but neither khoj-query-engine-launcher-10.0.0-ft.alpha.10.jar nor pom.xml are attached to the release.

Even if I run the step with debug enabled, I can't see any extra information that may lead to the problem.

Also, I see those Not Found and undefined on the logs. I'm unsure if they are related to the 404 error or a different one.

Other interesting details are that even reporting the 404 error for a specific filename, the file is still attached to the release, and the filenames on the action output list duplicated names, even not having duplicated filenames on the filesystem, and neither the file glob pattern is duplicated.

caquino commented 1 year ago

The issue was that the glob matched the same files and duplicated the input.