Cleanup readme and publish step
This commit is contained in:
@@ -231,21 +231,18 @@ build_test_wasm() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
package_wasm() {
|
package_wasm() {
|
||||||
mkdir -p wasm/dist
|
echo "Publishing WASM bindings..."
|
||||||
cp wasm/package.npm.json wasm/dist/package.json
|
cp wasm/package.npm.json wasm/dist/package.json
|
||||||
cp wasm/README.md wasm/dist/README.md || true
|
cp wasm/README.md wasm/dist/README.md || true
|
||||||
|
|
||||||
VERSION=${GITHUB_REF#refs/tags/}
|
VERSION=${GITHUB_REF#refs/tags/}
|
||||||
npm --prefix wasm/dist version "${VERSION}" --no-git-tag-version
|
npm --prefix wasm/dist version "${VERSION}" --no-git-tag-version
|
||||||
|
|
||||||
if [ -z "${NPM_TOKEN}" ]; then
|
if [ -z "${NPM_TOKEN}" ]; then
|
||||||
echo "NPM_TOKEN is not set or is invalid; aborting publish"
|
echo "NPM_TOKEN is not set or is invalid; aborting publish"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
|
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
|
||||||
|
|
||||||
npm pack --dry-run ./wasm/dist
|
npm pack --dry-run ./wasm/dist
|
||||||
|
|
||||||
npm publish ./wasm/dist --access public
|
npm publish ./wasm/dist --access public
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Build WASM bindings
|
- name: Build WASM bindings
|
||||||
run: bash ./.github/workflows/build_steps.sh build_test_wasm
|
run: bash ./.github/workflows/build_steps.sh build_test_wasm
|
||||||
|
|
||||||
- name: Package WASM bindings
|
- name: Package WASM bindings
|
||||||
env:
|
env:
|
||||||
NPM_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
|
NPM_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
|
||||||
|
|||||||
Reference in New Issue
Block a user