-
-
Notifications
You must be signed in to change notification settings - Fork 118
64 lines (53 loc) · 1.65 KB
/
github-actions-language-service.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Language Sevice
on:
push:
paths:
- "src/language-service/*"
- ".github/*"
pull_request:
paths:
- "src/language-service/*"
- ".github/*"
jobs:
language-service:
name: Language Service
runs-on: ubuntu-latest
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v4
- name: 🏗 Set up NodeJS
uses: actions/[email protected]
with:
node-version: "18"
- name: 🏗 Install NodeJS packages
working-directory: src/language-service
run: npm install
- name: 🚀 Run Linter
working-directory: src/language-service
run: npm run lint
- name: 🚀 Build Schema
working-directory: src/language-service
run: npm run schema
- name: 🚀 Run Compile
working-directory: src/language-service
run: npm run compile
- name: 🏗 Create .npmrc
if: success() && github.ref == 'refs/heads/master'
run:
echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" >> ~/.npmrc
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 🚀 Publish to NPM Registry
if: success() && github.ref == 'refs/heads/master'
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm publish src/language-service
# - name: NPM Publish to Registry
# uses: actions/npm@master
# if: success() && github.ref == 'refs/heads/master'
# env:
# NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# with:
# args: publish src/language-service