Skip to content
This repository has been archived by the owner on Mar 4, 2021. It is now read-only.

upload asset after release creation on github.com #34

Open
staabm opened this issue Feb 26, 2020 · 6 comments
Open

upload asset after release creation on github.com #34

staabm opened this issue Feb 26, 2020 · 6 comments

Comments

@staabm
Copy link

staabm commented Feb 26, 2020

I would like to upload a asset into a just created release.

the release will be created via the github.com website, and I would like to attach files to the just created release.

is this a supported workflow? how should/can it look like?

@staabm staabm changed the title upload asset after release creation upload asset after release creation on github.com Feb 26, 2020
@traversaro
Copy link

I had the same question, investigating a bit on other repos, it seems possible in a GitHub Action triggered by a release event, but passing as upload_url: ${{ github.event.release.upload_url }},
see for an example https://github.com/chacon000/userinputweathergame/blob/7c82cac9dbdaaf5295a8726ff4c95878e1fefbc0/.github/workflows/makecode-release.yml#L36 .
However, I still need to test this.

@staabm
Copy link
Author

staabm commented Mar 11, 2020

AFAIR we have a working worflow with https://github.com/staabm/annotate-pull-request-from-checkstyle/blob/master/.github/workflows/continuous-deployment.yml

@staabm
Copy link
Author

staabm commented Mar 11, 2020

Is that gonna help us via creating release thru web-ui and just then attach file to this release (we can do it manually thru edit button)?

not sure what you mean. the above linked action adds/attaches files to a relase which we create manueally via github.com UI (so we can't forget to add them).

@traversaro
Copy link

AFAIR we have a working worflow with https://github.com/staabm/annotate-pull-request-from-checkstyle/blob/master/.github/workflows/continuous-deployment.yml

Thanks a lot. I tried a bit, and indeed this seems to be working fine only if it is active only on published release event. Otherwise, I have failure problems, possibly related due concurring requests and related race conditions.

traversaro added a commit to iit-danieli-joint-lab/idjl-software-dependencies-vcpkg that referenced this issue Mar 21, 2020
Via this GitHub Action, it is possible to automatically upload the archive that contains the generate vcpkg archive. 

See actions/upload-release-asset#34 for details.
traversaro added a commit to robotology/robotology-superbuild-dependencies-vcpkg that referenced this issue Mar 21, 2020
Via this GitHub Action, it is possible to automatically upload the archive that contains the generate vcpkg archive.

See actions/upload-release-asset#34 for details.

See iit-danieli-joint-lab/idjl-software-dependencies-vcpkg#7 for a similar PR.
@traversaro
Copy link

AFAIR we have a working worflow with https://github.com/staabm/annotate-pull-request-from-checkstyle/blob/master/.github/workflows/continuous-deployment.yml

Thanks a lot. I tried a bit, and indeed this seems to be working fine only if it is active only on published release event. Otherwise, I have failure problems, possibly related due concurring requests and related race conditions.

Actually it turns out that at least part of this problem were due to the fact that we were using the GITHUB_TOKEN to upload the archives, but as our jobs is quite long, the job is longer then 1 hour, and so the GITHUB_TOKEN automatically generated expires. Use an explicitly generated access token fixed our problems, see iit-danieli-joint-lab/idjl-software-dependencies-vcpkg#10 .

@asbjornu
Copy link

The suggestion to use on: release: types: published won't work for builds that are currently based on on: tags, where the artifacts to upload are being produced by a long series of build steps, tests, etc. to ensure that the uploaded artifacts are valid.

Having to rework builds to take on: release: types: published into account as an alternative to on: tags is a major head-ache.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants