Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev_scripts: Upload release assets to GitHub #644

Merged
merged 2 commits into from
Dec 21, 2023
Merged

Conversation

apyrgio
Copy link
Contributor

@apyrgio apyrgio commented Dec 7, 2023

Add a script to upload release assets to GitHub. This script can take either a release ID, a Git tag, or the latest draft release.

Note that while GitHub's official client can upload assets to releases, it cannot upload them to draft releases 1, hence why we created this script.

@apyrgio apyrgio force-pushed the 2023-12-upload-assets branch from cff9093 to 44f1c52 Compare December 12, 2023 17:25
Copy link
Contributor

@deeplow deeplow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be super useful. I'm just thinking of how we can simplify the interface of this script. Most likely we'll use it infrequently enough that we won't remember how to operate it (and it may no longer be in the bash_history).

So it would be nice if we could use as intuitively as ./dev_scripts/upload-asset.py <asset>. To make this possible I have a few suggestions:

  • uploading by default to the latest draft release by default. If failed, asking the user to create first a draft release
  • asking for the token if not provided via --token along with instructions on how to get it. If I'm not mistaken, this token can have at most 1 year, so we'll need to renew it every 4-5 uses of the script.

dev_scripts/upload-asset.py Outdated Show resolved Hide resolved
@apyrgio
Copy link
Contributor Author

apyrgio commented Dec 14, 2023

Those are very good suggestions. I pushed a fixup commit (9cc346a) that should address them.

Copy link
Contributor

@deeplow deeplow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving the usability changes 🙂.

Add a script to upload release assets to GitHub. This script can take
either a release ID, a Git tag, or the latest draft release.

Note that while GitHub's official client can upload assets to releases,
it cannot upload them to draft releases [1], hence why we created this
script.

[1]: https://cli.github.com/manual/gh_release_upload
Add missing git dependency, which is required to run the `isort` command
on the development environment.
@apyrgio apyrgio force-pushed the 2023-12-upload-assets branch from 4e0c0ca to 12eda5d Compare December 21, 2023 19:38
@apyrgio apyrgio merged commit 12eda5d into main Dec 21, 2023
30 checks passed
@apyrgio apyrgio deleted the 2023-12-upload-assets branch May 22, 2024 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants