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

Upload failed with warning: UPLOAD_MODE "release" was specified but no URL to upload to could be detected #46

Open
timabell opened this issue Jun 11, 2022 · 4 comments

Comments

@timabell
Copy link

timabell commented Jun 11, 2022

Hi, thanks for creating this github action.

I've tried to set it up on this repo: https://github.com/timabell/gitopolis/actions (the main > release workflow yml files)

I've run into the following warning message and no release has appeared and I'm a bit stumped:

Warning: UPLOAD_MODE "release" was specified but no URL to upload to could be detected (build log)

I've followed the action's readme as best I can.

I see from

UPLOAD_URL=$(echo "$EVENT_DATA" | jq -r .release.upload_url)
that it's trying to get release.upload_url from the event json file, and looking at my build output there's no mention of that. I'm not sure why it's not there.

It's a brand new and didn't have any releases. I created a "pre-release" release but that didn't help. (I wondered if github only set that up if you have any releases). I'll keep trying and post an update here for the benefit of the internet if I figure anything else out.

Research:

@timabell timabell changed the title Upload filed with warning: UPLOAD_MODE "release" was specified but no URL to upload to could be detected Upload failed with warning: UPLOAD_MODE "release" was specified but no URL to upload to could be detected Jun 11, 2022
@Douile
Copy link
Member

Douile commented Jun 12, 2022

The workflow only has access to release data when triggered by a release event (you set which events trigger the workflow in the on section). You can only use the release mode when triggering with a release event otherwise please use a different upload mode.

@Gowee
Copy link

Gowee commented Aug 13, 2022

Hi.

In my case, releases are created by https://github.com/softprops/action-gh-release for pushed tags automatically. And the release event isn't triggered due to GitHub's limitations. Is it possible to allow setting UPLOAD_URL and RELEASE_NAME, so that users could specify them manually?

@thefireflyer
Copy link

thefireflyer commented Oct 22, 2022

Hi.

In my case, releases are created by https://github.com/softprops/action-gh-release for pushed tags automatically. And the release event isn't triggered due to GitHub's limitations. Is it possible to allow setting UPLOAD_URL and RELEASE_NAME, so that users could specify them manually?

Hi,
I'm not sure if this would work at all for your use case (or if this is still a relevant problem), but I managed to work around this issue by first compiling the files and storing them as artifacts, and then just using this library to publish those files.
Currently working implementation here
Hope this helps!

(@Gowee @AliSajid)

@AliSajid
Copy link

Hi.
In my case, releases are created by https://github.com/softprops/action-gh-release for pushed tags automatically. And the release event isn't triggered due to GitHub's limitations. Is it possible to allow setting UPLOAD_URL and RELEASE_NAME, so that users could specify them manually?

Hi, I'm not sure if this would work at all for your use case (or if this is still a relevant problem), but I managed to work around this issue by first compiling the files and storing them as artifacts, and then just using this library to publish those files. Currently working implementation here Hope this helps!

(@Gowee @AliSajid)

Thank you. Yes, I used this until I figured out that i plus also call this as a separate workflow when the release is published. That is also a neat workaround.

peteretelej added a commit to peteretelej/tree that referenced this issue May 7, 2023
Rust github action fails to publish with `Warning: UPLOAD_MODE "release" was specified but no URL to upload to could be detected`
if the workflow is not triggered by a release event.
- rust-build/rust-build.action#63
- rust-build/rust-build.action#46
jacklund added a commit to jacklund/voynich that referenced this issue Mar 1, 2024
Got an error that matches [this
issue](rust-build/rust-build.action#46),
attempting the workaround mentioned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants