Skip to content

Commit

Permalink
Fix working directory
Browse files Browse the repository at this point in the history
  • Loading branch information
blenderskool committed Mar 22, 2020
1 parent 0fbee57 commit a4eace4
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/lib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,42 @@ jobs:
lib-test:
name: Lib tests
runs-on: ubuntu-latest
env:
wd: ./lib
if: startsWith(github.ref, 'refs/tags/lib-')
steps:
- uses: actions/checkout@v2
- run: cd lib/
- run: cargo test
working-directory: ${{env.wd}}

lib-publish-npm:
needs: lib-test
name: Lib publish npm
runs-on: ubuntu-latest
env:
wd: ./lib
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- run: cd lib/
- run: cargo install wasm-pack
- run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- run: wasm-pack build -t web
working-directory: ${{env.wd}}
- run: wasm-pack publish
working-directory: ${{env.wd}}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

lib-publish-crate:
needs: lib-test
name: Lib publish crates.io
runs-on: ubuntu-latest
env:
wd: ./lib
steps:
- uses: actions/checkout@v2
- run: cargo login ${{ secrets.CRATES_TOKEN }}
- run: cargo publish
- run: cargo publish
working-directory: ${{env.wd}}

0 comments on commit a4eace4

Please sign in to comment.