action-gh-release icon indicating copy to clipboard operation
action-gh-release copied to clipboard

Please retry uploading when failed.

Open abcfy2 opened this issue 2 years ago • 11 comments

Sometimes I will get this error https://github.com/abcfy2/aria2-static-build/runs/4349111525?check_suite_focus=true:

Run softprops/action-gh-release@v1
/usr/bin/docker exec  356d60f2fa6f6229b94833f4ef730b7baa9d4f62c9f0341db5214911e5c29164 sh -c "cat /etc/*release | grep ^ID"
⬆️ Uploading aria2-aarch64-linux-musl_static.zip...
Error: request to https://uploads.github.com/repos/abcfy2/aria2-static-build/releases/54209979/assets?name=aria2-aarch64-linux-musl_static.zip failed, reason: read ECONNRESET

Please retry when uploading failed. Thanks.

abcfy2 avatar Nov 29 '21 04:11 abcfy2

Note that when using the GH Actions "rerun all jobs" after encountering this error, you can encounter https://github.com/softprops/action-gh-release/issues/166 instead, which requires deleting the half-uploaded files before re-running the jobs again will succeed.

wez avatar Dec 04 '21 16:12 wez

https://github.com/softprops/action-gh-release/pull/181 seems relevant

wez avatar Dec 04 '21 16:12 wez

If release assets share the same name they should be deleted when a release is reattempted https://github.com/softprops/action-gh-release/blob/58fa4b7a8863f6beaf115a49196308842b8b0f06/src/github.ts#L152

softprops avatar Dec 05 '21 03:12 softprops

@softprops Would you please add this feature? I'm facing this issue just now.

abcfy2 avatar Dec 06 '21 01:12 abcfy2

I am facing the same issue. Right now, I use this workaround:

steps:
  - name: Upload assets
    id: upload_try1
    continue-on-error: true
    uses: softprops/action-gh-release@v1
    with:
      files: ${{ env.RELEASE_ASSETS }}
  - name: Upload assets (retry)
    id: upload_try2
    if: steps.upload_try1.outcome == 'failure'
    continue-on-error: true
    uses: softprops/action-gh-release@v1
    with:
      files: ${{ env:RELEASE_ASSETS }}
# more retries

jonasmusall avatar Feb 02 '22 18:02 jonasmusall

+1 for this feature.

We're having an issue with uploading several .zip's from our build chain to the Release file host on Github. Most of them are successful but one or two have been consistently failing with ECONNRESET since around December 2021 or so. Thankfully we were able to come up with a manual workaround by stashing the .zip's as an artifact to the workflow instead of needing to re-run the entire build chain.

During my experiments to find a workaround, a short delay of 5 or 15s did not prevent ECONNRESET from occurring.

z64555 avatar Feb 26 '22 21:02 z64555

E.g. ncipollo/release-action do the job.

bergentroll avatar Jun 12 '22 12:06 bergentroll

The release already existed when I was trying to replace the assets. This failed about 5 times until I deleted the release entirely.

russkel avatar Jun 22 '22 06:06 russkel

Any updates on this?

bokan avatar Nov 15 '22 14:11 bokan

this constantly fails, do not use this workflow

Haaroon avatar Dec 06 '22 17:12 Haaroon

i used https://github.com/ncipollo/release-action and that solved my same problem...

Mpaape avatar May 09 '23 15:05 Mpaape