Skip to content

Commit

Permalink
Add usage of cache@v3 for dist binary build during release
Browse files Browse the repository at this point in the history
In order to help keep the release action fast, this commit adds caching
that should work across release action invocations.
  • Loading branch information
endoze committed Nov 14, 2024
1 parent 7fa8a69 commit e4c6fb2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,27 @@ jobs:
publishing: ${{ !github.event.pull_request }}
env:
GH_TOKEN: ${{ secrets.RELEASE_PLZ_TOKEN }}
CARGO_DIST_VERSION: a8077660fcae20ecda0e6709d6f42f0f542f5852
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
- name: Cache Cargo dist bin
id: cache-cargo-dist-bin
uses: actions/cache@v3
with:
path: ~/.cargo/bin/dist
key: ${{ runner.os }}-cargo-dist-${{ env.CARGO_DIST_VERSION }}
restore-keys: |
${{ runner.os }}-cargo-dist-
- 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
if: steps.cache-cargo-dist-bin.outputs.cache-hit != 'true'
run: "cargo install --git https://github.com/axodotdev/cargo-dist --rev a8077660fcae20ecda0e6709d6f42f0f542f5852 cargo-dist"
- name: Cache dist
uses: actions/upload-artifact@v4
Expand Down

0 comments on commit e4c6fb2

Please sign in to comment.