Skip to content

Commit

Permalink
Automate node and web package publishing trail 1
Browse files Browse the repository at this point in the history
  • Loading branch information
kavitharaju committed Nov 15, 2024
1 parent bc4173d commit ad03c52
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}

0 comments on commit ad03c52

Please sign in to comment.