Skip to content

Commit

Permalink
Updating to Node 20 (#14)
Browse files Browse the repository at this point in the history
* Adding Node 20 engine
* Automated release
  • Loading branch information
AnHeuermann authored Dec 15, 2023
1 parent 1fe4b6f commit 695804c
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 28 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/** -diff linguist-generated=true
25 changes: 24 additions & 1 deletion .github/workflows/build-parser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
push:
branches:
- master
tags:
- "v*.*.*"

jobs:
build:
Expand All @@ -16,7 +18,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'
- name: Clean install
run: npm ci
- name: Run build script
Expand All @@ -30,3 +32,24 @@ jobs:
name: tree-sitter-modelica.wasm
path: |
tree-sitter-modelica.wasm
if-no-files-found: error

release:
if: startsWith(github.ref, 'refs/tags/')
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
with:
name: tree-sitter-modelica.wasm

- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
tree-sitter-modelica.wasm
fail_on_unmatched_files: true
generate_release_notes: true
append_body: true
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,4 @@ successfully parsed and highlighted.
```bash
npx tree-sitter parse examples/DrumBoiler.mo
npx tree-sitter highlight examples/DrumBoiler.mo
```
```
38 changes: 14 additions & 24 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@
"version": "0.1.0",
"description": "Modelica grammar for tree-sitter",
"main": "bindings/node",
"engines": {
"node": "20"
},
"scripts": {
"build": "npx tree-sitter generate && npx node-gyp configure && npx node-gyp build && npx tree-sitter build-wasm . --docker",
"test": "tree-sitter test"
},
"dependencies": {
"nan": "^2.15.0"
"nan": "^2.18.0"
},
"devDependencies": {
"tree-sitter-cli": "0.20.4"
"tree-sitter-cli": "0.20.8"
},
"tree-sitter": [
{
Expand Down

0 comments on commit 695804c

Please sign in to comment.