-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Include version number in release archive names #9002
Conversation
This makes it possible to easily tell archives from different releases apart. Closes astral-sh#8961.
This looks reasonable to me and seems to match the scheme that @BurntSushi uses in ripgrep. I really appreciate that you went through the effort of actually testing this, and have included the example release link in the PR. |
@@ -86,7 +86,7 @@ jobs: | |||
path: dist | |||
- name: "Archive binary" | |||
run: | | |||
ARCHIVE_FILE=ruff-x86_64-apple-darwin.tar.gz | |||
ARCHIVE_FILE=ruff-${{ inputs.tag }}-x86_64-apple-darwin.tar.gz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Above, tag says "The version to tag, without the leading 'v'. If omitted, will initiate a dry run (no uploads)."
Do you know if that's still true? Can it be omitted? And, if it is omitted, what happens here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can still be omitted, in which case ${{ inputs.tag }}
expands to an empty string. That specific example would result in ruff--x86_64-apple-darwin.tar.gz
in dry-run mode. You can see an example in this workflow run.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be nice to omit the second dash, but that's just a debugging workflow so not critical.
One note to consider here is whether there are any docs anywhere that walk someone through downloading and extracting a release archive. Those might need to be updated to reflect the name change. |
The installation instructions don't mention these archives at all, and a grep for |
Thanks @tobbez! Great PR. |
Summary
Add a release's version number to the names of archives containing binaries that are attached to that GitHub release.
This makes it possible for users to easily tell archives from different downloaded releases apart.
See also: #8961
Test Plan
The workflow was tested in my fork. The example release can be found at: https://github.com/tobbez/ruff/releases/tag/v0.1.7.
To allow the workflow run to succeed in the fork while testing, I had to use a small commit to prevent interaction with external services (ghcr, PyPI, and the ruff-pre-commit repository):
Those workflow jobs are however not modified by this PR, so they should not be affected.