Skip to content

Commit 013ace0

Browse files
authored
Update dependencies and remove unnecessary steps in deploy workflows
Update command to generate WASM for the node dependency.
1 parent 85364c2 commit 013ace0

File tree

9 files changed

+14
-17
lines changed

9 files changed

+14
-17
lines changed

.github/workflows/deploy_to_crates.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@v4
16-
- name: Setup wasm-pack
17-
run: cargo install wasm-pack
1816
- name: Cache dependencies
1917
uses: actions/cache@v4
2018
with:
@@ -24,7 +22,7 @@ jobs:
2422
~/.cargo/registry/cache/
2523
~/.cargo/git/db/
2624
target/
27-
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
25+
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.toml') }}
2826
- uses: katyo/publish-crates@v2
2927
with:
3028
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}

.github/workflows/deploy_to_npm.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,12 @@ jobs:
2525
~/.cargo/registry/cache/
2626
~/.cargo/git/db/
2727
target/
28-
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
28+
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.toml') }}
2929
- name: Package file
30-
run: wasm-pack build --target web --scope nightrunner --release
30+
run: wasm-pack build --scope nightrunner --release
3131
- name: Deploy to NPM
3232
uses: JS-DevTools/npm-publish@v3
3333
with:
3434
token: ${{ secrets.NPM_TOKEN }}
3535
package: ./pkg/package.json
3636
access: public
37-
check-version: true

.github/workflows/test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
~/.cargo/registry/cache/
2323
~/.cargo/git/db/
2424
target/
25-
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
25+
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.toml') }}
2626
- name: Build
2727
run: cargo build
2828
- name: Test
@@ -51,6 +51,6 @@ jobs:
5151
~/.cargo/registry/cache/
5252
~/.cargo/git/db/
5353
target/
54-
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
54+
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.toml') }}
5555
- name: Test WASM library
5656
run: wasm-pack test --headless --firefox -- --test web

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "nightrunner_lib"
3-
version = "0.3.0"
3+
version = "0.3.1"
44
edition = "2021"
55
resolver="2"
66
authors = ["Aimeri Baddouh <[email protected]>"]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ to YAML files containing the configuration for the game to
2424
use nightrunner_lib::NightRunner;
2525
use nightrunner_lib::NightRunnerBuilder;
2626
use nightrunner_lib::parser::interpreter::{ParsingResult};
27-
let nr = NightRunnerBuilder::new().with_path("/game_config/").build();
27+
let mut nr = NightRunnerBuilder::new().with_path("/game_config/").build();
2828
let result = nr.parse_input("look");
2929
let json_result = nr.json_parse_input("look");
3030
assert!(result.is_ok());

examples/wasm/react/package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/wasm/react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"preview": "vite preview"
99
},
1010
"dependencies": {
11-
"@nightrunner/nightrunner_lib": "^0.3.0",
11+
"@nightrunner/nightrunner_lib": "^0.3.1",
1212
"react": "^17.0.2",
1313
"react-dom": "^17.0.2"
1414
},

examples/wasm/typescript/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/wasm/typescript/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
"vite-plugin-wasm": "^3.3.0"
1414
},
1515
"dependencies": {
16-
"@nightrunner/nightrunner_lib": "^0.3.0"
16+
"@nightrunner/nightrunner_lib": "^0.3.1"
1717
}
1818
}

0 commit comments

Comments
 (0)