mirror of https://github.com/pyodide/pyodide.git
Correctly specify files to be packed in a npm package (#3168)
This commit is contained in:
parent
693570755c
commit
7d3e19b0f6
|
@ -383,6 +383,11 @@ jobs:
|
|||
git checkout 164054a9c6fbd2176f386b6552ed8d079c6bcc04
|
||||
./build.sh
|
||||
|
||||
- run:
|
||||
name: test npm deploy (dry run)
|
||||
command: |
|
||||
DRY_RUN=1 ./tools/deploy_to_npm.sh
|
||||
|
||||
test-cmdline-runner:
|
||||
<<: *defaults
|
||||
steps:
|
||||
|
|
|
@ -61,7 +61,14 @@
|
|||
"./repodata.json": "./repodata.json"
|
||||
},
|
||||
"files": [
|
||||
"pyodide*",
|
||||
"pyodide.asm.js",
|
||||
"pyodide.asm.wasm",
|
||||
"pyodide.asm.data",
|
||||
"pyodide_py.tar",
|
||||
"pyodide.mjs",
|
||||
"pyodide.js.map",
|
||||
"pyodide.mjs.map",
|
||||
"pyodide.d.ts",
|
||||
"repodata.json",
|
||||
"console.html"
|
||||
],
|
||||
|
|
|
@ -4,14 +4,21 @@ set -e
|
|||
|
||||
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
|
||||
|
||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
cd "$SCRIPT_DIR"/..
|
||||
|
||||
# FIXME: since we release from dist directory, README file needs to be copied before release
|
||||
cp src/js/README.md dist/
|
||||
cp src/js/package.json dist/
|
||||
|
||||
cd dist/
|
||||
|
||||
PACKAGE_NAME=$(node -p "require('./package.json').name")
|
||||
JS_VERSION=$(node -p "require('./package.json').version")
|
||||
if [[ ${JS_VERSION} =~ [alpha|beta|rc|dev] ]]; then
|
||||
if [[ -n "${DRY_RUN}" ]]; then
|
||||
echo "Dry run: npm publish --tag ${JS_VERSION}"
|
||||
npm publish --dry-run
|
||||
elif [[ ${JS_VERSION} =~ [alpha|beta|rc|dev] ]]; then
|
||||
echo "Publishing an unstable release"
|
||||
npm publish --tag next
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue