mirror of
https://github.com/astral-sh/ruff.git
synced 2026-05-06 08:56:57 -04:00
Fetch the cargo-dist binary directly instead of using the installer (#24258)
See https://github.com/astral-sh/uv/pull/18731
This commit is contained in:
@@ -48,6 +48,10 @@ on:
|
||||
default: dry-run
|
||||
type: string
|
||||
|
||||
env:
|
||||
CARGO_DIST_VERSION: "0.31.0"
|
||||
CARGO_DIST_CHECKSUM: "cd355dab0b4c02fb59038fef87655550021d07f45f1d82f947a34ef98560abb8"
|
||||
|
||||
jobs:
|
||||
# Run 'dist plan' (or host) to determine what tasks we need to do
|
||||
plan:
|
||||
@@ -65,10 +69,12 @@ jobs:
|
||||
persist-credentials: false
|
||||
submodules: recursive
|
||||
- name: Install dist
|
||||
# we specify bash to get pipefail; it guards against the `curl` command
|
||||
# failing. otherwise `sh` won't catch that `curl` returned non-0
|
||||
shell: bash
|
||||
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.31.0/cargo-dist-installer.sh | sh"
|
||||
run: |
|
||||
curl --proto '=https' --tlsv1.2 -LsSf "https://github.com/axodotdev/cargo-dist/releases/download/v${CARGO_DIST_VERSION}/cargo-dist-x86_64-unknown-linux-gnu.tar.xz" -o /tmp/cargo-dist.tar.xz
|
||||
echo "${CARGO_DIST_CHECKSUM} /tmp/cargo-dist.tar.xz" | sha256sum -c -
|
||||
tar -xf /tmp/cargo-dist.tar.xz -C /tmp
|
||||
install /tmp/cargo-dist-x86_64-unknown-linux-gnu/dist ~/.cargo/bin/
|
||||
- name: Cache dist
|
||||
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f
|
||||
with:
|
||||
|
||||
@@ -4,6 +4,8 @@ packages = ["ruff"]
|
||||
|
||||
# Config for 'dist'
|
||||
[dist]
|
||||
# We customize installation of `cargo-dist` in `release.yml` to avoid `curl | sh`
|
||||
allow-dirty = ["ci"]
|
||||
# The preferred dist version to use in CI (Cargo.toml SemVer syntax)
|
||||
cargo-dist-version = "0.31.0"
|
||||
# Whether to consider the binaries in a package for distribution (defaults true)
|
||||
|
||||
Reference in New Issue
Block a user