Skip to content

Commit

Permalink
Caching crates when publishing
Browse files Browse the repository at this point in the history
emmyoh committed Oct 10, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 8f15b67 commit a411b09
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -15,18 +15,24 @@ jobs:
gh api /repos/emmyoh/vox/commits/master --jq '.sha' > vox_rev
curl https://crates.io/api/v1/crates/grass > grass_rev
- name: Restore Cargo cache
id: cache-cargo
uses: actions/cache@v1
id: cache-cargo-restore
uses: actions/cache/restore@v4
with:
path: ~/.cargo
key: ${{ runner.os }}-cargo-${{ hashFiles('vox_rev', 'grass_rev') }}
restore-keys: |
${{ runner.os }}-cargo-${{ hashFiles('vox_rev', 'grass_rev') }}
- if: ${{ steps.cache-cargo.outputs.cache-hit != 'true' }}
- if: ${{ steps.cache-cargo-restore.outputs.cache-hit != 'true' }}
name: Install Grass and Vox
run: |
time cargo install grass
time cargo install --git https://github.com/emmyoh/vox --features="cli"
- if: ${{ steps.cache-cargo-restore.outputs.cache-hit != 'true' }}
name: Save Cargo cache
uses: actions/cache/save@v4
with:
path: ~/.cargo
key: ${{ runner.os }}-cargo-${{ hashFiles('vox_rev', 'grass_rev') }}
- name: Checkout codebase
uses: actions/checkout@v4
- name: Generate stylesheet

0 comments on commit a411b09

Please sign in to comment.