-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (40 loc) · 1.3 KB
/
update-cpp-parser.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Update Dependencies
on:
schedule:
- cron: '0 0 * * *' # every day at midnight
push:
branches: ["master"]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '17'
- name: Update scanner
run: |
curl https://raw.githubusercontent.com/tree-sitter/tree-sitter-cpp/master/src/scanner.c -o src/scanner.c
sed -i 's/tree_sitter_cpp/tree_sitter_slang/g' src/scanner.c
git diff
- name: Update CPP parser
run: npm update
- name: Install dependencies
run: npm ci
- name: Regenerate Source Files
run: node_modules/.bin/tree-sitter generate --abi 14
- name: Generate parser
run: npm install
- name: Commit changes
run: |
git config user.name "GitHub"
git config user.email "[email protected]"
git commit -am "Update dependencies and regenerate parser" || echo 'No commit necessary!'
git clean -xf
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
commit-message: Update dependencies
title: Update dependencies
branch: update-dependencies-pr
base: ${{ github.head_ref }}