From ad03c52fcd21d83c91f978b7776db3f378834f60 Mon Sep 17 00:00:00 2001 From: kavitharaju Date: Fri, 15 Nov 2024 13:35:11 +0530 Subject: [PATCH] Automate node and web package publishing trail 1 --- .github/workflows/npm-publish.yml | 40 +++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 3745eff4..df426374 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -49,3 +49,43 @@ jobs: env: NODE_AUTH_TOKEN: ${{secrets.npm_token}} + Publish-node-usfm-grammar: + needs: Test-grammar + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 20.4 + registry-url: https://registry.npmjs.org/ + - run: | + cd node-usfm-parser + npm run build + npm publish . + env: + NODE_AUTH_TOKEN: ${{secrets.npm_token}} + + Publish-web-usfm-grammar: + needs: Test-grammar + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 20.4 + registry-url: https://registry.npmjs.org/ + - run: | + cd tree-sitter-usfm3 + npm install --save nan + npm install --save-dev tree-sitter-cli + ./node_modules/.bin/tree-sitter generate + ./node_modules/.bin/tree-sitter build --wasm + cp tree-sitter-usfm3.wasm ../web-usfm-parser/tree-sitter-usfm.wasm + cd web-usfm-parser/ + npm install . + cp ./node_modules/web-tree-sitter/tree-sitter.js src/web-tree-sitter/ + cp ./node_modules/web-tree-sitter/tree-sitter.wasm ./ + npm run build + npm publish . + env: + NODE_AUTH_TOKEN: ${{secrets.npm_token}}