jreleaser / release-action

:octocat: GitHub Action for JReleaser
https://jreleaser.org
Apache License 2.0
34 stars 3 forks source link

action/upload-artifact v4 breaks Jreleaser #15

Closed melloware closed 8 months ago

melloware commented 8 months ago

See the issue apparently v4 is a major upgrade that doesn't allow overwrite:true to work anymore.

Failed to CreateArtifact: Received non-retryable error: Failed request: (409) Conflict: an artifact with this name already exists on the workflow run

See: https://github.com/actions/upload-artifact/issues/478

See example JReleaser failure log here: https://github.com/open-sce/fluent-cli/actions/runs/7254116343/job/19762158254

I think the JReleaser script needs to be updated for v4 and to be able to handle this hopefully?

aalmiray commented 8 months ago

The main action does not rely on actions/upload-artifact and thus should not be affected by it. If your workflow explicitly configures said action then you'll have to handle uploads (and likely downloads as well) according to the rules of v4.

The java builder OTOH (found in the java branch) makes use of old versions and would need an upgrade but should not encounter the error reported in this issue once the uploaded JReleaser logs are renamed to be unique.

melloware commented 8 months ago

I am using the artifact upload based on all the examples provided by Jreleaser? So I am unclear as to what the action item is to allow for v4? Even the example on this README.MD uses it?

Can you provide some guidance what I need to do?

aalmiray commented 8 months ago

There's a migration doc in both upload-artifact explaining the changes you must make of both sides (upload/download): https://github.com/actions/upload-artifact/blob/main/docs/MIGRATION.md

melloware commented 8 months ago

@aalmiray thanks I was able to upgrade to v4 with this commit: https://github.com/open-sce/fluent-cli/commit/900fed54e6680276ffbc62365843f005ceb7e990

If you want to update any JReleaser docs.

jtama commented 1 month ago

Hi just spent half a day on this. Thanks @melloware for the solution. I was following the wrong trail.

The documentation still points to aalmiray/q-cli, which uses v3 upload/download github actions.