Skip to content

Commit

Permalink
Merge pull request #41 from holochain/feat/cache-rust-utils
Browse files Browse the repository at this point in the history
Feat/cache rust utils
  • Loading branch information
mrruby authored Feb 9, 2024
2 parents 6e57a26 + b1b0bd5 commit 4187211
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/get-versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: Extract Versions Workflow
on:
workflow_call:
outputs:
rust_utils_version:
description: "Rust utils version"
value: ${{ jobs.extract-versions.outputs.rust_utils_version }}
version:
description: "App version"
value: ${{ jobs.extract-versions.outputs.version }}
Expand All @@ -23,10 +26,12 @@ jobs:
- name: Extract version information
id: packagejson
run: |
echo "rust_utils_version=$(node -p "require('./rust-utils/package.json').version")" >> $GITHUB_OUTPUT
echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
echo "holochain_version=$(node -p "require('./package.json').binaries.holochain")" >> $GITHUB_OUTPUT
echo "lair_keystore_version=$(node -p "require('./package.json').binaries.lair_keystore")" >> $GITHUB_OUTPUT
outputs:
version: ${{ steps.packagejson.outputs.version }}
rust_utils_version: ${{ steps.packagejson.outputs.rust_utils_version }}
holochain_version: ${{ steps.packagejson.outputs.holochain_version }}
lair_keystore_version: ${{ steps.packagejson.outputs.lair_keystore_version }}
10 changes: 9 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,15 @@ jobs:
with:
go-version: 'stable'

- name: build rust-utils
- name: Cache rust-utils build
id: cache-rust-utils
uses: actions/cache@v4
with:
path: rust-utils/dist
key: ${{ runner.os }}-rust-utils-${{ needs.extract-versions.outputs.rust_utils_version }}

- name: Conditionally Setup rust-utils
if: steps.cache-rust-utils.outputs.cache-hit != 'true'
run: yarn setup

- name: install app dependencies
Expand Down

0 comments on commit 4187211

Please sign in to comment.