{"id":28503598,"url":"https://github.com/scikit-build/github-release","last_synced_at":"2026-03-08T04:31:42.050Z","repository":{"id":19629686,"uuid":"22881604","full_name":"scikit-build/github-release","owner":"scikit-build","description":"Manage github releases from the command line","archived":false,"fork":false,"pushed_at":"2024-02-03T09:14:42.000Z","size":322,"stargazers_count":57,"open_issues_count":16,"forks_count":22,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-09-26T03:04:23.055Z","etag":null,"topics":["github","pypi","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scikit-build.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE_Apache_20","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2014-08-12T15:01:17.000Z","updated_at":"2025-03-14T08:57:37.000Z","dependencies_parsed_at":"2024-02-03T10:25:42.829Z","dependency_job_id":"1e12d4a8-0644-410e-86b1-ca107a14a82a","html_url":"https://github.com/scikit-build/github-release","commit_stats":{"total_commits":199,"total_committers":8,"mean_commits":24.875,"dds":"0.17085427135678388","last_synced_commit":"e2a11e9b009d5c5b2e5f264e50a138094feefbbf"},"previous_names":["j0057/github-release"],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/scikit-build/github-release","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scikit-build%2Fgithub-release","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scikit-build%2Fgithub-release/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scikit-build%2Fgithub-release/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scikit-build%2Fgithub-release/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scikit-build","download_url":"https://codeload.github.com/scikit-build/github-release/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scikit-build%2Fgithub-release/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30245219,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T00:58:18.660Z","status":"online","status_checked_at":"2026-03-08T02:00:06.215Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github","pypi","python"],"created_at":"2025-06-08T17:30:40.493Z","updated_at":"2026-03-08T04:31:42.034Z","avatar_url":"https://github.com/scikit-build.png","language":"Python","readme":"# githubrelease\n\n[![Build Status](https://travis-ci.org/j0057/github-release.svg?branch=master)](https://travis-ci.org/j0057/github-release)\n\nThis project aims at streamlining the distribution of\n[releases](https://github.com/blog/1547-release-your-software) on Github.\n\n\u003e I made it because it sucks to have to download a file from a server,\n\u003e only to upload it to Github from the desktop.\n\u003e\n\u003e It also sucks to download a file from github to your desktop, and then\n\u003e SCP it to a server.\n\u003e\n\u003e This thing works nicely from an SSH session.\n\u003e\n\u003e -- \u003ccite\u003e@j0057 on Wednesday, August 13, 2014\u003c/cite\u003e\n\n\n# examples\n\nfrom the command-line:\n\n```bash\n# create a prerelease\n$ githubrelease release jcfr/sandbox create 1.0.0 --prerelease\n\n# upload assets\n$ githubrelease asset jcfr/sandbox upload 1.0.0 \"dist/*\"\n\n# publish the release\n$ githubrelease release jcfr/sandbox publish 1.0.0\n\n# or all together: create with custom name, upload assets, and publish\n$ githubrelease release jcfr/sandbox create 2.0.0 --publish --name \"Awesome 2.0\" \"dist/*\"\n```\n\n... or even from python:\n\n```python\nfrom github_release import gh_release_create\ngh_release_create(\"jcfr/sandbox \", \"2.0.0\", publish=True, name=\"Awesome 2.0\", asset_pattern=\"dist/*\")\n```\n\n*That said, if you are looking for a full fledged GitHub API support for\nPython, you should probably look into project like [github3py](http://github3py.readthedocs.io/en/latest/) or\n[PyGithub](https://github.com/PyGithub/PyGithub)*\n\n# Table of Contents\n\n   * [githubrelease](#githubrelease)\n   * [examples](#examples)\n   * [features](#features)\n   * [installing](#installing)\n   * [configuring](#configuring)\n   * [using the cli](#using-the-cli)\n      * [release command](#release-command)\n      * [asset command](#asset-command)\n      * [ref command](#ref-command)\n   * [using the module](#using-the-module)\n   * [testing](#testing)\n   * [maintainers: how to make a release ?](#maintainers-how-to-make-a-release-)\n   * [license](#license)\n\n\u003c!--\n*Created by [gh-md-toc](https://github.com/ekalinin/github-markdown-toc)*\n--\u003e\n\n# features\n\n* create release, pre-release, or draft release\n* update any release metadata including referenced commit\n* support wildcard expression (or list of wildcard expressions):\n  * for upload or download of assets\n  * for selectively deleting assets\n* report download and upload progress\n* allow deleting individual asset from a release\n* retry upload in case of server failure\n* gracefully handle release with invalid assets (the ones with *new* state)\n* authentication through `GITHUB_TOKEN` environment variable or `~/.netrc` file\n* pure python, only depends on [requests](http://docs.python-requests.org/en/master/) and [click](http://pocco-click.readthedocs.io)\n\n\n# installing\n\nReleased stable version can be installed from [pypi](https://pypi.python.org/pypi/githubrelease) using:\n\n```bash\npip install githubrelease\n```\n\nBleeding edge version can be installed using:\n\n```bash\npip intall githubrelease -f https://github.com/j0057/github-release/releases/tag/latest\n```\n\n# configuring\n\nFirst, [generate a new token](https://help.github.com/articles/creating-an-access-token-for-command-line-use). It\nshould have at least the `repo` scope.\n\nThen, there are three options:\n\n* Set the `GITHUB_TOKEN` environment variable:\n\n```bash\nexport GITHUB_TOKEN=YOUR_TOKEN\n/path/to/command\n```\n\n* Pass the ``--github-token`` CLI argument. For example:\n\n```bash\n$ githubrelease --github-token YOUR_TOKEN release jcfr/sandbox create --prerelease 1.0.0\n```\n\n\n* Put the key in `~/.netrc`, which should have mode 0600 (`-rw-------`):\n\n```\nmachine api.github.com\nlogin YOUR_TOKEN\npassword x-oauth-basic\n\nmachine uploads.github.com\nlogin YOUR_TOKEN\npassword x-oauth-basic\n```\n\nwhere ``YOUR_TOKEN`` should be replaced with the generated token.\n\n# using the cli\n\nThe package installs one CLI named ``githubrelease``.\n\n```bash\n$ githubrelease \nUsage: githubrelease [OPTIONS] COMMAND [ARGS]...\n\n  A CLI to easily manage GitHub releases, assets and references.\n\nOptions:\n  --github-token TEXT         [default: GITHUB_TOKEN env. variable]\n  --progress / --no-progress  Display progress bar (default: yes).\n  --help                      Show this message and exit.\n\nCommands:\n  asset    Manage release assets (upload, download, ...)...\n  ref      Manage references (list, create, delete, ...)...\n  release  Manage releases (list, create, delete, ...)...\n\nRun 'githubrelease COMMAND --help' for more information on a command.\n```\n\n*For backward compatibility, it also installs `github-release` and `github-asset`*\n\n## ``release`` command\n\nThis command deals with releases. The general usage is:\n\n```bash\ngithubrelease release username/reponame command [tag] [options]\n```\n\nIt understands the following commands:\n\n| command       | parameters        | description                       |\n|---------------|-------------------|-----------------------------------|\n| list          |                   | list all releases                 |\n| info          | tagname           | list one release                  |\n| create        | tagname [options] | create a release                  |\n| edit          | tagname [options] | Edit a release                    |\n| delete        | tagname                | delete a release             |\n| publish       | tagname [--prerelease] | make release public          |\n| unpublish     | tagname [--prerelease] | make release draft           |\n| release-notes | tagname           | use $EDITOR to edit release notes |\n\n**Optional parameters:**\n\n* create:\n\n```bash\n  --name NAME\n  --body BODY\n  --publish\n  --prerelease\n  --target-commitish TARGET_COMMITISH\n  --help\n  [ASSET_PATTERN]...\n```\n\n* edit:\n\n```bash\n  --tag-name TAG_NAME\n  --target-commitish TARGET_COMMITISH\n  --name NAME\n  --body BODY\n  --draft/--publish\n  --prerelease/--release\n  --dry-run\n  --verbose\n  --help\n```\n\n* delete:\n\n```bash\n  --keep-pattern KEEP_PATTERN\n  --type [all, draft, prerelease, release]\n  --older-than HOURS\n  --dry-run\n  --verbose\n  --help\n  [ASSET_PATTERN]...\n```\n\n## ``asset`` command\n\nThis command deals with release assets. The general usage is:\n\n```bash\ngithubrelease asset username/reponame command [tag] [filename] [options]\n```\n\nIt understands the following commands:\n\n| command   | parameters                 | description                                               |\n|-----------|----------------------------|-----------------------------------------------------------|\n| list      |                            | list all assets                                           |\n| upload    | tagname filename...        | upload files to a release                                 |\n| download  |                            | download all files from all releases to current directory |\n| download  | tagname                    | download all files from a release to current directory    |\n| download  | tagname filename           | download file to current directory                        |\n| delete    | tagname filename [options] | delete a file from a release                              |\n\n\n**Optional parameters:**\n\n* delete:\n\n```bash\n--keep-pattern KEEP_PATTERN\n```\n\n\n**Remarks:**\n\nWhen specifying filenames, shell-like wildcards are supported, but make sure to\nquote using single quotes, i.e. don't let the shell expand the wildcard pattern.\n\nFor the `download` command, you also need to specify a tagname of `'*'`\n\n\n**Examples:**\n\n```bash\n# upload all example-project-1.4* files in /home/me/pkg\n$ githubrelease asset octocat/example-project upload 1.4 '/home/me/pkg/example-project-1.4*'\n\n# download all wheels from all releases\n$ githubrelease asset octocat/example-project download '*' '*.whl'\n\n# download all files from release 1.4\n$ githubrelease asset octocat/example-project download 1.4\n\n# download all files from example-project\n$ githubrelease asset octocat/example-project download\n```\n\n## ``ref`` command\n\nThis command deals with git references. The general usage is:\n\n```bash\ngithubrelease ref username/reponame command [options]\n```\n\nIt understands the following commands:\n\n| command   | parameters                             | description                                |\n|-----------|----------------------------------------|--------------------------------------------|\n| create    | ref sha                                | create reference (e.g heads/foo, tags/foo) |\n| list      | [--tags] [--pattern PATTERN]           | list all references                        |\n| delete    | pattern [--tags] [--keep-pattern KEEP_PATTERN] | delete selected references                 |\n\n\n# using the module\n\nThe python API mirrors the command-line interface. Most of the available\nfunction names follows this pattern:\n\n```\ngh_\u003cCOMMAND\u003e_\u003cCOMMAND\u003e\n```\n\nwhere the first ``\u003cCOMMAND\u003e`` is either ``release``,\n``asset`` or ``ref`` and the second one is any command respectively\ndocumented above.\n\nThe parameters accepted by each function also mirrors the command-line\ninterface. The usual signature is:\n\n```python\ngh_\u003cCOMMAND\u003e_\u003cCOMMAND\u003e(repo_name, [param, [param,]] [option, [option]])\n```\n\nFor example, here is the signature for ``gh_release_create``:\n\n```python\ndef gh_release_create(repo_name, tag_name, \n                      name=None, publish=False, prerelease=False, target_commitish=None):\n```\n\nThe type of each parameters or options can usually be inferred from\nits name. If not, consider looking at [github_release.py](https://github.com/j0057/github-release/blob/update-readme/github_release.py).\n\n```\nrepo_name        -\u003e str\ntag_name         -\u003e str\nname             -\u003e str\npublish          -\u003e bool\nprerelease       -\u003e bool\ntarget_commitish -\u003e str\n```\n\n# testing\n\nThere are tests running automatically on TravisCI:\n* coding style checks\n* integration tests\n\nSince the integration tests are expecting ``GITHUB_TOKEN`` to be set, they will\n**NOT** be executed when pull request from fork are submitted. Indeed, setting\n``GITHUB_TOKEN`` is required by the tests to reset and update [github-release-bot/github-release-test-py2](https://github.com/github-release-bot/github-release-test-py2)\nand [github-release-bot/github-release-test-py3](https://github.com/github-release-bot/github-release-test-py3).\n\nTo execute the integration tests locally, and make sure your awesome contribution\nis working as expected, you will have to:\n* create a test repository with at least one commit (e.g `yourname/github-release-test`)\n* set environment variable ``INTEGRATION_TEST_REPO_NAME=yourname/github-release-test``\n* execute ``python setup.py test``\n\nTo execute a specific test, the following also works:\n\n```bash\nexport GITHUB_TOKEN=YOUR_TOKEN\nexport INTEGRATION_TEST_REPO_NAME=yourname/github-release-test\n$ pytest tests/test_integration_release_create.py::test_create_release\n```\n\nMoving forward, the plan would be to leverage tools like [betamax](http://betamax.readthedocs.io)\nallowing to intercept every request made and attempting to find a matching request\nthat has already been intercepted and recorded.\n\n\n# maintainers: how to make a release ?\n\n1. Configure `~/.pypirc` as described [here](https://packaging.python.org/distributing/#uploading-your-project-to-pypi).\n\n2. Make sure the cli and module work as expected.\n\n3. Choose the next release version number:\n\n   ```bash\n   release=\"X.Y.Z\"\n   ```\n\n4. Review [CHANGES.md](https://github.com/j0057/github-release/blob/master/README.md), replace *Next Release* into *X.Y.Z*, commit and push. Consider using `[ci skip]` in commit message:\n\n   ```bash\n   sed -i -e \"s/Next Release/${release}/\" CHANGES.md\n   sed -i -e \"s/============/=====/\" CHANGES.md\n   git add CHANGES.md\n   git commit -m \"CHANGES.md: Replace \\\"Next Release\\\" with \\\"${release}\\\"\n\n   [ci skip]\n   \"\n   ```\n\n   Review commit, then push:\n\n   ```bash\n   git push origin master\n   ```\n\n5. Tag the release. Requires a GPG key with signatures:\n\n    ```bash\n    git tag -s -m \"githubrelease ${release}\" ${release} origin/master\n    ```\n\n    And push:\n\n    ```bash\n    git push origin ${release}\n    ```\n\n6. Create the source tarball and binary wheels:\n\n    ```bash\n    rm -rf dist/\n    python setup.py sdist bdist_wheel\n    ```\n\n7. Upload the packages to the testing PyPI instance:\n\n    ```bash\n    twine upload --sign -r pypitest dist/*\n    ```\n\n8. Check the [PyPI testing package page](https://test.pypi.org/project/githubrelease/).\n\n9. Upload the packages to the PyPI instance::\n\n    ```bash\n    twine upload --sign dist/*\n    ```\n\n10. Check the [PyPI package page](https://pypi.org/project/githubrelease/).\n\n11. Create a virtual env, and make sure the package can be installed:\n\n    ```bash\n    mkvirtualenv test-githubrelease-install\n    pip install githubrelease\n    ```\n\n12. Create github release and upload packages:\n\n    ```bash\n    export GITHUB_TOKEN=YOUR_TOKEN\n    githubrelease release j0057/github-release create ${release} --name ${release} --publish ./dist/*\n    ```\n\n13. Update release notes by copying relevant content from CHANGES.md\n\n    ```bash\n    export EDITOR=vim\n    githubrelease release j0057/github-release release-notes ${release}\n    ```\n\n14. Cleanup\n\n    ```bash\n    deactivate\n    rmvirtualenv test-githubrelease-install\n    ```\n\n    And update ``CHANGES.md``:\n\n    ```bash\n    sed -i '1i Next Release\\n============\\n' CHANGES.md\n    git add CHANGES.md\n    git commit -m \"Begin ${release} development\n\n    * CHANGES.md: Add \\\"Next Release\\\" section\n\n    [ci skip]\n    \"\n    git push origin master\n    ```\n\n# faq\n\n* Why do I get a ``requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url  https://api.github.com/repos/...`` ?\n\n  It probably means that the GitHub token you specified is invalid.\n\n\n# license\n\nWritten by Joost Molenaar ([@j0057](https://github.com/j0057)) and Jean-Christophe Fillion-Robin ([@jcfr](https://github.com/jcfr))\n\nIt is covered by the Apache License, Version 2.0:\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nThe license file was added at revision 0393859 on 2017-02-12, but you may\nconsider that the license applies to all prior revisions as well.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscikit-build%2Fgithub-release","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscikit-build%2Fgithub-release","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscikit-build%2Fgithub-release/lists"}