@@ -14,46 +14,76 @@ jobs:
14
14
runs-on : windows-latest
15
15
16
16
steps :
17
+ - name : Setup Git LF
18
+ run : |
19
+ git config --global core.autocrlf false
17
20
- uses : actions/checkout@v4
18
-
19
- - name : Set up Node.js version
20
- uses : actions/setup-node@v3
21
+ - uses : dorny/paths-filter@v3
22
+ id : filter
21
23
with :
22
- node-version : ' 6.9.1'
23
-
24
- - name : npm install, build, and test
24
+ filters : |
25
+ ts:
26
+ - "ts/**"
27
+ - ".github/workflows/build-ts.yml"
28
+ - uses : pnpm/action-setup@v4
29
+ if : ${{ github.event_name != 'pull_request' || steps.filter.outputs.ts == 'true' }}
30
+ name : Install pnpm
31
+ with :
32
+ version : 9
33
+ run_install : false
34
+ - uses : actions/setup-node@v4
35
+ if : ${{ github.event_name != 'pull_request' || steps.filter.outputs.ts == 'true' }}
36
+ with :
37
+ node-version : ${{ matrix.version }}
38
+ cache : " pnpm"
39
+ cache-dependency-path : ts/pnpm-lock.yaml
40
+ - name : Install dependencies
41
+ if : ${{ github.event_name != 'pull_request' || steps.filter.outputs.ts == 'true' }}
42
+ working-directory : ts
25
43
run : |
26
- npm install
27
- npm run build --if-present
28
- npm run test --if-present
29
-
44
+ pnpm install --frozen-lockfile --strict-peer-dependencies
45
+ - name : Build
46
+ if : ${{ github.event_name != 'pull_request' || steps.filter.outputs.ts == 'true' }}
47
+ working-directory : ts
48
+ run : |
49
+ npm run build
50
+ - name : Test
51
+ if : ${{ github.event_name != 'pull_request' || steps.filter.outputs.ts == 'true' }}
52
+ working-directory : ts
53
+ run : |
54
+ npm run test
55
+ - name : Lint
56
+ if : ${{ github.event_name != 'pull_request' || steps.filter.outputs.ts == 'true' }}
57
+ working-directory : ts
58
+ run : |
59
+ npm run lint
30
60
- name : Upload artifact for deployment job
31
- uses : actions/upload-artifact@v4
61
+ uses : actions/upload-artifact@v4.4.3
32
62
with :
33
63
name : node-app
34
- path : .
64
+ path : ./ts
35
65
36
66
deploy :
37
67
runs-on : ubuntu-latest
38
68
needs : build
39
69
environment :
40
70
name : ' test'
41
71
url : ${{ steps.deploy-to-webapp.outputs.webapp-url }}
42
- permissions :
43
- id-token : write # This is required for requesting the JWT
72
+ permissions :
73
+ id-token : write # This is required for requesting the JWT
44
74
45
75
steps :
46
76
- name : Download artifact from build job
47
77
uses : actions/download-artifact@v4
48
78
with :
49
79
name : node-app
50
-
51
- - name : Login to Azure
52
- uses : azure/login@v2
53
- with :
54
- client-id : ${{ secrets.AZUREAPPSERVICE_CLIENTID_1737A011C9524DB7B04BBA3C4CAD4D3B }}
55
- tenant-id : ${{ secrets.AZUREAPPSERVICE_TENANTID_647DD88831BD44CAB40887C46F38D94B }}
56
- subscription-id : ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_CC74772213664D8DBCA650B4E6EEFEA1 }}
80
+
81
+ - name : Login to Azure
82
+ uses : azure/login@v2
83
+ with :
84
+ client-id : ${{ secrets.AZUREAPPSERVICE_CLIENTID_1737A011C9524DB7B04BBA3C4CAD4D3B }}
85
+ tenant-id : ${{ secrets.AZUREAPPSERVICE_TENANTID_647DD88831BD44CAB40887C46F38D94B }}
86
+ subscription-id : ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_CC74772213664D8DBCA650B4E6EEFEA1 }}
57
87
58
88
- name : ' Deploy to Azure Web App'
59
89
uses : azure/webapps-deploy@v3
62
92
app-name : ' typeagent'
63
93
slot-name : ' test'
64
94
package : .
65
-
95
+
0 commit comments