diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index af153cf..322a6fc 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -12,17 +12,35 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: '20' registry-url: 'https://registry.npmjs.org/' + scope: '@trust0' # Replace with your organization scope cache: 'npm' cache-dependency-path: ./package-lock.json - + + - name: Install Rust toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + + - name: Install wasm-pack + run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh + + - name: Configure npm authentication + run: | + echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ./.npmrc + echo "@trust0:registry=https://registry.npmjs.org/" >> ./.npmrc + env: + NPM_TOKEN: ${{ env.NPM_TOKEN }} + - name: Install WASM + env: + NPM_TOKEN: ${{ env.NPM_TOKEN }} + GH_TOKEN: ${{ secrets.GH_SECRET }} run: | curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh npm ci