-
Notifications
You must be signed in to change notification settings - Fork 34
34 lines (32 loc) · 965 Bytes
/
commit-grammar.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
name: Commit Grammar
on:
push:
branches: [main]
jobs:
commit_grammar:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: 11
- name: Download ANTLR 4.13.1
working-directory: /tmp
run: |
wget https://www.antlr.org/download/antlr-4.13.1-complete.jar
- name: Update grammar
working-directory: kin/grammar
run: |
java -jar /tmp/antlr-4.13.1-complete.jar PBXProj.g4 -Dlanguage=Python3
- name: Commit changes
run: |
git add kin/grammar
git status
if [ "$(git status --porcelain)" ]; then
git config --global user.email "actions@users.noreply.github.com"
git config --global user.name "Kin grammar bot"
git commit -m "Update grammar"
git push
fi