mirror of
https://github.com/swc-project/swc.git
synced 2024-12-24 22:22:34 +03:00
chore(ci): Fix publish action (#5358)
This commit is contained in:
parent
c08c3bc124
commit
4c461d1ba7
5
.github/workflows/publish-node.yml
vendored
5
.github/workflows/publish-node.yml
vendored
@ -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 }}
|
||||
|
@ -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 {
|
||||
|
@ -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"
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user