Skip to content

Commit

Permalink
Disable windows for now. Bump to 0.2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
willcrichton committed Nov 24, 2022
1 parent c8918ad commit 4ad7dee
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 39 deletions.
76 changes: 40 additions & 36 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "mdbook-quiz"
authors = ["Will Crichton <[email protected]>"]
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"
Expand Down
2 changes: 1 addition & 1 deletion js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wcrichto/quiz",
"version": "0.2.4",
"version": "0.2.5",
"description": "",
"author": "Will Crichton <[email protected]>",
"homepage": "https://github.com/willcrichton/mdbook-quiz",
Expand Down

0 comments on commit 4ad7dee

Please sign in to comment.