File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ pull_request :
5+ push :
6+ branches : [main]
7+
8+ permissions :
9+ contents : read
10+
11+ jobs :
12+ test :
13+ runs-on : ubuntu-latest
14+ strategy :
15+ fail-fast : false
16+ matrix :
17+ node-version : [20.x, 22.x]
18+
19+ steps :
20+ - uses : actions/checkout@v4
21+
22+ - name : Use Node.js ${{ matrix.node-version }}
23+ uses : actions/setup-node@v4
24+ with :
25+ node-version : ${{ matrix.node-version }}
26+ cache : npm
27+
28+ - name : Install dependencies
29+ run : npm ci
30+
31+ - name : Build grammar
32+ run : npm run build
33+
34+ - name : Verify committed grammars are in sync with the source
35+ run : |
36+ if ! git diff --exit-code -- grammars/; then
37+ echo "::error::grammars/ is out of date. Run 'npm run build' and commit the result."
38+ exit 1
39+ fi
40+
41+ - name : Run tests
42+ run : npm test
Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ release :
5+ types : [published]
6+
7+ permissions :
8+ contents : write
9+
10+ jobs :
11+ publish :
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - uses : actions/checkout@v4
16+
17+ - name : Use Node.js
18+ uses : actions/setup-node@v4
19+ with :
20+ node-version : 20.x
21+ cache : npm
22+
23+ - name : Install dependencies
24+ run : npm ci
25+
26+ - name : Build grammar
27+ run : npm run build
28+
29+ - name : Run tests
30+ run : npm test
31+
32+ - name : Attach grammar to the release
33+ env :
34+ GH_TOKEN : ${{ github.token }}
35+ run : gh release upload "${{ github.event.release.tag_name }}" grammars/qsharp.tmLanguage.json --clobber
You can’t perform that action at this time.
0 commit comments