Skip to content

Instantly share code, notes, and snippets.

@m-kuhn
Last active June 16, 2016 10:08
Show Gist options
  • Save m-kuhn/0def6eb67d1017a10342 to your computer and use it in GitHub Desktop.
Save m-kuhn/0def6eb67d1017a10342 to your computer and use it in GitHub Desktop.

How to upload a file to a github release

  • Create the release using the github page

  • Query the github API for the upload URL

    curl -i https://api.github.com/repos/opengisch/osgeo4travis/releases/tags/{releasename}
    
  • Search for the upload_url

  • Upload the file

curl --user "m-kuhn" --data @osgeo4travis.tar.xz https://uploads.github.com/repos/opengisch/osgeo4travis/releases/2768243/assets?name=osgeo4travis.tar.xz -H "Content-Type:application/zip"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment