Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
scripts: Add script to rename (add label to) release assets
The only way I've found to add a label to existing release assets on GitHub is via the GitHub API. Add a script to "rename" (add a label) to existing assets. In particular, we rename the archive containing the sources for veristat and its libbpf submodule. Example invocation (with REPO modified to point to my fork): $ ./scripts/gh-label-release-assets.sh test02 repo: qmonnet/veristat, release tag: test02 found release ID 101340990 found asset ID 105863030 asset 'veristat-libbpf-test02-sources.tar.gz': add label 'Source code, including libbpf submodule (tar.gz)' proceed? [y/N]: y [ ... JSON output from API request ... ] After running the script, instead of being listed as "veristat-libbpf-<tag>-sources.tar.gz", the asset appears on GitHub's interface as "Source code, including libbpf submodule (tar.gz)". More assets could easily be renamed as well by extending the array in the script. The script is not run from CI, because it requires the release to be published (we only automated the creation of the draft release). The script requires the GitHub command line ("gh") to be set up. If the asset is found but the update fails with a 404 error, this is usually synonym of unsufficient permissions for the GitHub token in use. Signed-off-by: Quentin Monnet <quentin@isovalent.com>
- Loading branch information