ci(js): create bindings, cleanup artifacts, add token

This commit is contained in:
əlemi 2024-09-09 21:26:58 +02:00
parent f5b3a25192
commit 15b43310c2
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -55,9 +55,9 @@ jobs:
node-version: '20' node-version: '20'
- run: npm install - run: npm install
working-directory: dist/js/publish working-directory: dist/js/publish
- run: npx napi build --cargo-cwd=../../.. --features=js - run: npx napi build --cargo-cwd=../../.. --platform --features=js
working-directory: dist/js/publish working-directory: dist/js/publish
- run: rm codemp.node - run: rm *.node
working-directory: dist/js/publish working-directory: dist/js/publish
- run: npx napi create-npm-dir -t . - run: npx napi create-npm-dir -t .
working-directory: dist/js/publish working-directory: dist/js/publish
@ -69,6 +69,10 @@ jobs:
working-directory: dist/js/publish working-directory: dist/js/publish
- run: npx napi prepublish -t . --skip-gh-release - run: npx napi prepublish -t . --skip-gh-release
working-directory: dist/js/publish working-directory: dist/js/publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: rm -rf *.node artifacts node_modules
working-directory: dist/js/publish
- uses: JS-DevTools/npm-publish@v3 - uses: JS-DevTools/npm-publish@v3
with: with:
token: ${{ secrets.NPM_TOKEN }} token: ${{ secrets.NPM_TOKEN }}