githubwebhookscontinuous-deploymentsourceforge

GitHub does not re-trigger webhook on Release changes


For my https://github.com/bkimminich/juice-shop project I use a webhook provided by Sourceforge (https://sourceforge.net/p/juice-shop/files/github_webhook) to create a release over there whenever the Release event is fired by GitHub. This webhook picks up all files attached to the release (on GitHub) and uploads them to Sourceforge. So far, so good.

My problem now is, that I attach more files to the release later during the CI/CD process, namely pre-packaged distribution archives built on Tavis-CI and Appveyor. These do not make it to Sourceforge, because they don't exist yet when the webhook is originally executed. There is no automatic re-triggering of the webhook on a change (i.e. attaching more files) to a GitHub release, it would seem.

Sourceforge release after manually redelivering

The workaround for this problem is to manually re-trigger the last webhook call, which will then pick up all files, including those that were added later, and upload them to Sourceforge.

Redeliver button for webhook on GitHub

But this is a manual process, so it kind of breaks the last step in my automation chain. Is there a way to automate this properly?


Solution

  • This is the official answer of GitHub support team with clear recommendation to go with the first option:

    • don't publish a release before you have all the files in it. Instead, create a pre-release or a draft release, then trigger Travis/Appveyor to build the files you need, then add the files to the release, and finally publish the release. The webhook will be triggered when the release is published at which point all the files will be present.

    • after you update the release with the additional files, use the API to fetch those files and upload them to SourceForge. I'm not sure if SourceForge provides the APIs necessary to do this on their end, so you'd need to ask them for advice.

    • after you update the release with the additional files, un-publish the release and publish it again. This should trigger the webhook again and you can do this step via the API.