Fetch the cargo-dist binary directly instead of using the installer (#18731)

This commit is contained in:
Zanie Blue
2026-03-26 15:40:15 -05:00
committed by GitHub
parent 4faa20e7d8
commit 66c65913d0
2 changed files with 18 additions and 4 deletions
+9 -1
View File
@@ -1,6 +1,10 @@
on:
workflow_call:
env:
CARGO_DIST_VERSION: "0.31.0"
CARGO_DIST_CHECKSUM: "cd355dab0b4c02fb59038fef87655550021d07f45f1d82f947a34ef98560abb8"
jobs:
dist-plan:
name: "dist plan"
@@ -15,7 +19,11 @@ jobs:
- name: Install dist
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: Run dist plan
run: |
+9 -3
View File
@@ -47,6 +47,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:
@@ -64,10 +68,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@6027e3dd177782cd8ab9af838c04fd81a07f1d47
with: