diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f608b28..744ceab 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,9 +26,7 @@ jobs: run: | rustup toolchain install ${AQUASCOPE_TOOLCHAIN} -c rust-src rustc-dev llvm-tools-preview miri cargo +${AQUASCOPE_TOOLCHAIN} miri setup - echo "LD_LIBRARY_PATH=$($(rustup which --toolchain ${AQUASCOPE_TOOLCHAIN} rustc) --print target-libdir)" >> ${GITHUB_ENV} - - mkdir bin + echo "LD_LIBRARY_PATH=$($(rustup which --toolchain ${AQUASCOPE_TOOLCHAIN} rustc) --print target-libdir)" >> ${GITHUB_ENV} curl -sSL https://github.com/cognitive-engineering-lab/aquascope/releases/download/v${AQUASCOPE_VERSION}/aquascope-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin echo "$(pwd)/bin" >> ${GITHUB_PATH} - name: Test Rust package @@ -38,6 +36,8 @@ jobs: - name: Test JS package run: depot test working-directory: js + - name: Install mdbook-quiz + run: cargo install --path crates/mdbook-quiz --debug --locked - name: Build example mdbook run: mdbook build working-directory: example/mdbook diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9d66e74..b206a6e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -91,23 +91,18 @@ jobs: # This ensures that the `crates/mdbook-quiz/js/` directory is # populated before running publish - name: Cargo build - run: cargo build + run: cargo build + - name: Install mdbook-quiz + run: cargo install --path crates/mdbook-quiz --debug --locked + - name: Build example mdbook + run: mdbook build + working-directory: example/mdbook - name: Cargo release run: cargo workspaces publish --from-git --yes --allow-dirty --token ${{ secrets.CARGO_TOKEN }} - uses: JS-DevTools/npm-publish@v1 with: token: ${{ secrets.NPM_TOKEN }} package: ./js/packages/quiz/package.json - - name: Install mdbook - run: | - mkdir bin - curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.14/mdbook-v0.4.14-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin - echo "$(pwd)/bin" >> ${GITHUB_PATH} - - name: Install mdbook-quiz - run: cargo install --path crates/mdbook-quiz --debug --locked - - name: Build example mdbook - run: mdbook build - working-directory: example/mdbook - name: Deploy to Github Pages uses: peaceiris/actions-gh-pages@v3 with: diff --git a/.github/workflows/setup/action.yaml b/.github/workflows/setup/action.yaml index a63e3b0..9f210f3 100644 --- a/.github/workflows/setup/action.yaml +++ b/.github/workflows/setup/action.yaml @@ -24,6 +24,12 @@ runs: curl https://raw.githubusercontent.com/cognitive-engineering-lab/depot/main/scripts/install.sh | sh echo "$HOME/.local/bin" >> ${GITHUB_PATH} shell: bash + - name: Install mdbook + run: | + mkdir bin + curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.14/mdbook-v0.4.14-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin + echo "$(pwd)/bin" >> ${GITHUB_PATH} + shell: bash - name: Initialize TS bindings run: cargo make init-bindings shell: bash \ No newline at end of file