-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c34856a
commit 51d8c66
Showing
2 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# based on: https://plippe.github.io/blog/2021/07/12/rust-wasm-github.html | ||
name: Continuous deployment | ||
on: | ||
workflow_run: | ||
branches: [main] | ||
workflows: [Continuous integration] | ||
types: [completed] | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
target: wasm32-unknown-unknown | ||
|
||
- uses: jetli/wasm-pack-action@v0.4.0 | ||
- uses: jetli/wasm-bindgen-action@v0.2.0 | ||
|
||
- uses: actions/checkout@v4 | ||
|
||
- run: wasm-pack build --target web --release | ||
- run: mkdir ./wasm/pkg && cp ./pkg/rusty_weather_lib.js ./pkg/rusty_weather_lib_bg.wasm ./wasm/pkg | ||
|
||
- uses: s0/git-publish-subdir-action@develop | ||
env: | ||
REPO: self | ||
BRANCH: gh-pages | ||
FOLDER: ./wasm | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# from: https://plippe.github.io/blog/2021/07/12/rust-wasm-github.html | ||
name: Continuous integration | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: cargo test --all | ||
|
||
format: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: cargo fmt --all -- --check | ||
|
||
clippy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: cargo clippy --all -- -D warnings |