chore(ci): Fix publish action (#5358)

This commit is contained in:
Donny/강동윤 2022-08-01 21:07:28 +09:00 committed by GitHub
parent c08c3bc124
commit 4c461d1ba7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 4 deletions

View File

@ -217,13 +217,16 @@ jobs:
run: |
yarn install --ignore-scripts --registry https://registry.npmjs.org --network-timeout 300000
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
echo '/usr/local/cargo/bin' >> $GITHUB_PATH
- name: Build in docker
uses: addnab/docker-run-action@v3
if: ${{ matrix.settings.docker }}
with:
image: ${{ matrix.settings.docker }}
options: -v ${{ env.HOME }}/.cargo/git:/root/.cargo/git -v ${{ env.HOME }}/.cargo/registry:/root/.cargo/registry -v ${{ github.workspace }}:/build -w /build
run: ${{ matrix.settings.build }}
run: >-
yarn global add wasm-pack &&
${{ matrix.settings.build }}
- name: Build
if: ${{ !matrix.settings.docker }}
run: ${{ matrix.settings.build }}

View File

@ -16,7 +16,7 @@ import * as assert from "assert";
// Allow overrides to the location of the .node binding file
const bindingsOverride = process.env["SWC_BINARY_PATH"];
// `@swc/core` includes d.ts for the `@swc/wasm` to provide typed fallback bindings
let fallbackBindings: typeof import('../../crates/binding_core_wasm/pkg');
let fallbackBindings: any;
const bindings: typeof import('./binding') = (() => {
let binding
try {

View File

@ -60,8 +60,8 @@
"pack": "wasm-pack",
"build:ts": "tsc -d",
"build:wasm": "npm-run-all \"pack -- build ./crates/binding_core_wasm --scope swc {1} -t {2} --features plugin\" --",
"build": "npm run build:wasm -- --debug nodejs && tsc -d && napi build --platform --cargo-name binding_core_node --js ./node-swc/src/binding.js --dts ./node-swc/src/binding.d.ts -p binding_core_node --release",
"build:dev": "npm run build:wasm -- --debug nodejs && tsc -d && napi build --platform --cargo-name binding_core_node --js ./node-swc/src/binding.js --dts ./node-swc/src/binding.d.ts -p binding_core_node",
"build": "tsc -d && napi build --platform --cargo-name binding_core_node --js ./node-swc/src/binding.js --dts ./node-swc/src/binding.d.ts -p binding_core_node --release",
"build:dev": "tsc -d && napi build --platform --cargo-name binding_core_node --js ./node-swc/src/binding.js --dts ./node-swc/src/binding.d.ts -p binding_core_node",
"test": "cross-env NODE_OPTIONS='--experimental-vm-modules' jest --config ./node-swc/jest.config.js",
"version": "napi version -p scripts/npm"
},