From 4ad7dee6e195cece7badbc89afa091d27a7d754b Mon Sep 17 00:00:00 2001 From: Will Crichton Date: Thu, 24 Nov 2022 12:21:39 -0600 Subject: [PATCH] Disable windows for now. Bump to 0.2.5 --- .github/workflows/release.yml | 76 ++++++++++++++++++----------------- Cargo.lock | 2 +- Cargo.toml | 2 +- js/package.json | 2 +- 4 files changed, 43 insertions(+), 39 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e830c42..12046d8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,37 +6,6 @@ on: - "v*" jobs: - publish: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Setup - uses: ./.github/workflows/setup - - uses: actions-rs/cargo@v1 - with: - command: publish - # --allow-dirty needed for js/dist files - args: --allow-dirty --token ${{ secrets.CARGO_TOKEN }} - - uses: JS-DevTools/npm-publish@v1 - with: - token: ${{ secrets.NPM_TOKEN }} - package: ./js/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 . --debug --locked - - name: Build example mdbook - run: mdbook build - working-directory: example - - name: Deploy to Github Pages - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./example/book - build-artifacts: strategy: matrix: @@ -46,8 +15,11 @@ jobs: target: x86_64-unknown-linux-gnu - os: macos-latest target: x86_64-apple-darwin - - os: windows-latest - target: x86_64-pc-windows-msvc + ## TODO: Windows needs specific configuration to find + ## NPM globally installed binaries, and I couldn't figure + ## it out in ~30 minutes. Deal with this later. + # - os: windows-latest + # target: x86_64-pc-windows-msvc # ARM - os: ubuntu-latest target: aarch64-unknown-linux-gnu @@ -63,7 +35,8 @@ jobs: profile: minimal override: true - name: Install JS dependencies - run: npm install -g pnpm + run: | + npm install -g pnpm - name: Build Rust package uses: actions-rs/cargo@v1 with: @@ -74,6 +47,38 @@ jobs: name: ${{ matrix.target }} path: target/release/mdbook-quiz* + publish: + needs: build-artifacts + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Setup + uses: ./.github/workflows/setup + - uses: actions-rs/cargo@v1 + with: + command: publish + # --allow-dirty needed for js/dist files + args: --allow-dirty --token ${{ secrets.CARGO_TOKEN }} + - uses: JS-DevTools/npm-publish@v1 + with: + token: ${{ secrets.NPM_TOKEN }} + package: ./js/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 . --debug --locked + - name: Build example mdbook + run: mdbook build + working-directory: example + - name: Deploy to Github Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./example/book + publish-artifacts: needs: build-artifacts runs-on: ubuntu-latest @@ -83,8 +88,7 @@ jobs: with: files: | x86_64-unknown-linux-gnu/mdbook-quiz - x86_64-apple-darwin/mdbook-quiz - x86_64-pc-windows-msvc/mdbook-quiz.exe + x86_64-apple-darwin/mdbook-quiz aarch64-unknown-linux-gnu/mdbook-quiz aarch64-apple-darwin/mdbook-quiz diff --git a/Cargo.lock b/Cargo.lock index 75be83a..29e8e6d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -525,7 +525,7 @@ dependencies = [ [[package]] name = "mdbook-quiz" -version = "0.2.4" +version = "0.2.5" dependencies = [ "anyhow", "clap", diff --git a/Cargo.toml b/Cargo.toml index f335afc..0097654 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ name = "mdbook-quiz" authors = ["Will Crichton "] description = "Interactive quizzes for your mdBook" license = "MIT" -version = "0.2.4" +version = "0.2.5" edition = "2021" include = ["/src", "/js/dist/"] repository = "https://github.com/willcrichton/mdbook-quiz" diff --git a/js/package.json b/js/package.json index 9bd2901..50bea74 100644 --- a/js/package.json +++ b/js/package.json @@ -1,6 +1,6 @@ { "name": "@wcrichto/quiz", - "version": "0.2.4", + "version": "0.2.5", "description": "", "author": "Will Crichton ", "homepage": "https://github.com/willcrichton/mdbook-quiz",