Florian/fix node nightly (#3937)

This commit is contained in:
Florian Blasius 2023-11-15 19:03:43 +01:00 committed by GitHub
parent 2c775156f7
commit 450443d8f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 7 deletions

View file

@ -18,14 +18,14 @@ on:
description: "Release? Enable options for building binaries for a release (i.e. apply a nightly tag, nightly version)"
schedule:
- cron: '0 5 * * *'
- cron: '0 5 * * *'
jobs:
build_and_publish_npm_package:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-linux-dependencies
- uses: ./.github/actions/install-linux-dependencies
- uses: ./.github/actions/setup-rust
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
@ -50,6 +50,12 @@ jobs:
run: |
echo "PKG_EXTRA_ARGS=--sha1=$GITHUB_SHA" >> $GITHUB_ENV
echo "PUBLISH_TAG=--tag nightly" >> $GITHUB_ENV
- name: Compile index.js and index.d.ts
working-directory: api/node
run: |
npm install
npm run build
npm run compile
- name: Build package
run: |
cargo xtask node_package $PKG_EXTRA_ARGS

1
.gitignore vendored
View file

@ -14,3 +14,4 @@ docs/reference/src/language/builtins/enums.md
docs/reference/src/language/builtins/structs.md
*.node
*.d.ts

View file

@ -11,3 +11,4 @@ yarn.lock
.yarn
__test__
renovate.json
rust-module.*

View file

@ -16,15 +16,18 @@
"@types/node-fetch": "^2.6.7",
"ava": "^5.3.0",
"jimp": "^0.22.8",
"typedoc": "^0.25.2"
"typedoc": "^0.25.2",
"esbuild": "^0.19.5",
"typescript": "^5.2.2"
},
"engines": {
"node": ">= 10"
},
"scripts": {
"artifacts": "napi artifacts",
"compile": "esbuild index.ts --bundle --external:*.node --format=cjs --platform=node --outfile=index.js && tsc --declaration --emitDeclarationOnly",
"build": "napi build --platform --release --js rust-module.js --dts rust-module.d.ts && npm run compile",
"compile_dts": "tsc index.ts --target esnext --module nodenext --moduleResolution nodenext --declaration --emitDeclarationOnly",
"compile": "esbuild index.ts --bundle --external:*.node --format=cjs --platform=node --outfile=index.js && npm run compile_dts",
"build": "napi build --platform --release --js rust-module.js --dts rust-module.d.ts",
"build:debug": "napi build --platform --js rust-module.js --dts rust-module.d.ts && npm run compile && npm run syntax_check",
"install": "npm run build",
"docs": "npm run build && typedoc --hideGenerator --treatWarningsAsErrors --readme cover.md index.ts",
@ -45,7 +48,6 @@
}
},
"dependencies": {
"@napi-rs/cli": "^2.16.5",
"esbuild": "^0.14.54"
"@napi-rs/cli": "^2.16.5"
}
}