Skip to content

Commit 695804c

Browse files
authored
Updating to Node 20 (#14)
* Adding Node 20 engine * Automated release
1 parent 1fe4b6f commit 695804c

File tree

5 files changed

+45
-28
lines changed

5 files changed

+45
-28
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
src/** -diff linguist-generated=true

.github/workflows/build-parser.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
push:
99
branches:
1010
- master
11+
tags:
12+
- "v*.*.*"
1113

1214
jobs:
1315
build:
@@ -16,7 +18,7 @@ jobs:
1618
- uses: actions/checkout@v4
1719
- uses: actions/setup-node@v4
1820
with:
19-
node-version: '18'
21+
node-version: '20'
2022
- name: Clean install
2123
run: npm ci
2224
- name: Run build script
@@ -30,3 +32,24 @@ jobs:
3032
name: tree-sitter-modelica.wasm
3133
path: |
3234
tree-sitter-modelica.wasm
35+
if-no-files-found: error
36+
37+
release:
38+
if: startsWith(github.ref, 'refs/tags/')
39+
needs: build
40+
runs-on: ubuntu-latest
41+
permissions:
42+
contents: write
43+
steps:
44+
- uses: actions/download-artifact@v4
45+
with:
46+
name: tree-sitter-modelica.wasm
47+
48+
- name: Release
49+
uses: softprops/action-gh-release@v1
50+
with:
51+
files: |
52+
tree-sitter-modelica.wasm
53+
fail_on_unmatched_files: true
54+
generate_release_notes: true
55+
append_body: true

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,4 @@ successfully parsed and highlighted.
9595
```bash
9696
npx tree-sitter parse examples/DrumBoiler.mo
9797
npx tree-sitter highlight examples/DrumBoiler.mo
98-
```
98+
```

package-lock.json

Lines changed: 14 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,18 @@
33
"version": "0.1.0",
44
"description": "Modelica grammar for tree-sitter",
55
"main": "bindings/node",
6+
"engines": {
7+
"node": "20"
8+
},
69
"scripts": {
710
"build": "npx tree-sitter generate && npx node-gyp configure && npx node-gyp build && npx tree-sitter build-wasm . --docker",
811
"test": "tree-sitter test"
912
},
1013
"dependencies": {
11-
"nan": "^2.15.0"
14+
"nan": "^2.18.0"
1215
},
1316
"devDependencies": {
14-
"tree-sitter-cli": "0.20.4"
17+
"tree-sitter-cli": "0.20.8"
1518
},
1619
"tree-sitter": [
1720
{

0 commit comments

Comments
 (0)