1- name : authzed-node-ci
1+ name : " Lint and Test "
22on :
33 push :
44 branches :
99 merge_group :
1010 types :
1111 - " checks_requested"
12- release :
13- types : [published]
1412jobs :
1513 paths-filter :
1614 runs-on : " buildjet-2vcpu-ubuntu-2204"
@@ -45,38 +43,12 @@ jobs:
4543 - uses : actions/setup-node@v4
4644 with :
4745 node-version : ${{ matrix.node-version }}
46+ cache : " yarn"
4847 - uses : bahmutov/npm-install@v1
49- with :
50- install-command : yarn --frozen-lockfile --silent
51- working-directory : ./
5248 - name : Run lint
5349 run : CI=true yarn lint
54- working-directory : ./
5550 - name : Run Yarn tests
5651 run : CI=true yarn only-run-tests
57- working-directory : ./
58- publish-npm :
59- name : Publish to NPM
60- needs :
61- - test
62- runs-on : ubuntu-latest
63- if : github.event_name == 'release'
64- steps :
65- - uses : actions/checkout@v4
66- - uses : actions/setup-node@v4
67- with :
68- node-version : 18
69- - uses : bahmutov/npm-install@v1
70- with :
71- install-command : yarn --frozen-lockfile --silent
72- working-directory : ./
73- - run : yarn test
74- - uses : battila7/get-version-action@v2
75- - uses : JS-DevTools/npm-publish@v3
76- with :
77- token : ${{ secrets.NPM_TOKEN }}
78- tag : ${{ steps.get_version.outputs.version }}
79- access : public
8052 build-js-client :
8153 name : Build and Test JS client
8254 runs-on : " buildjet-2vcpu-ubuntu-2204"
@@ -94,16 +66,13 @@ jobs:
9466 - uses : actions/setup-node@v4
9567 with :
9668 node-version : ${{ matrix.node-version }}
69+ cache : " yarn"
9770 - uses : bahmutov/npm-install@v1
98- with :
99- install-command : yarn --frozen-lockfile --silent
100- working-directory : ./
10171 - name : Run build
10272 run : yarn build-js-client
10373 working-directory : ./
10474 - uses : bahmutov/npm-install@v1
10575 with :
106- install-command : yarn --frozen-lockfile --silent
10776 working-directory : ./js-dist
10877 - name : Run tests
10978 run : CI=true yarn only-run-tests
@@ -114,26 +83,3 @@ jobs:
11483 path : |
11584 js-dist/**
11685 !js-dist/node_modules/**
117- publish-js-client-npm :
118- name : Publish JS client to NPM
119- needs : build-js-client
120- runs-on : ubuntu-latest
121- if : github.event_name == 'release'
122- steps :
123- - name : Download js client build
124- uses : actions/download-artifact@v4
125- with :
126- name : js-client-18
127- - uses : actions/setup-node@v4
128- with :
129- node-version : 18
130- - uses : bahmutov/npm-install@v1
131- with :
132- install-command : yarn --frozen-lockfile --silent
133- working-directory : ./
134- - uses : battila7/get-version-action@v2
135- - uses : JS-DevTools/npm-publish@v3
136- with :
137- token : ${{ secrets.NPM_TOKEN }}
138- tag : ${{ steps.get_version.outputs.version }}
139- access : public
0 commit comments