99 types :
1010 - created
1111
12+ env :
13+ TURBO_API : ' http://127.0.0.1:9080'
14+ TURBO_TOKEN : ${{ secrets.TURBO_SERVER_TOKEN }}
15+ TURBO_TEAM : ${{ github.repository_owner }}
16+
1217jobs :
1318 build :
1419 runs-on : ubuntu-latest
15- env :
16- TURBO_API : ' http://127.0.0.1:9080'
17- TURBO_TOKEN : ${{ secrets.TURBO_SERVER_TOKEN }}
18- TURBO_TEAM : ${{ github.repository_owner }}
20+ permissions :
21+ actions : read
1922
2023 steps :
2124 - uses : actions/checkout@v3
2225 - name : Use Node.js
2326 uses : actions/setup-node@v3
2427 with :
25- node-version : " 18.x"
26-
27- registry-url : " https://registry.npmjs.org"
28+ node-version : ' 16'
2829
2930 - name : Cache dependencies
3031 id : cache
3132 uses : actions/cache@v3
3233 with :
33- path : " **/node_modules"
34+ path : ' **/node_modules'
3435 key : ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
3536
3637 - name : Install dependencies
3738 if : steps.cache.outputs.cache-hit != 'true'
3839 run : yarn install --immutable
3940
40- - name : Setup local cache server for Turborepo
41+ - name : Setup a local cache server for Turborepo
4142 uses : felixmosh/turborepo-gh-artifacts@v2
4243 with :
4344 repo-token : ${{ secrets.GITHUB_TOKEN }}
44- server-token : ${{ secrets.TURBO_SERVER_TOKEN }}
45+ server-token : ${{ env.TURBO_TOKEN }}
4546
46- - run : yarn verify
47- - run : yarn turbo build --color --concurrency=5
48- - name : Upload Artifacts
49- uses : actions/upload-artifact@v3
50- with :
51- name : packages
52- path : |
53- packages/**/dist
47+
48+ - name : Run lint, type checks and tests
49+ run : yarn verify
50+
51+ - name : Run build
52+ run : yarn turbo build --color --concurrency=5
5453
5554 pre_release :
5655 runs-on : ubuntu-latest
@@ -61,16 +60,17 @@ jobs:
6160
6261 steps :
6362 - uses : actions/checkout@v3
64- - name : Download Artifacts
65- uses : actions/download-artifact@v2
6663 - name : Use Node.js
6764 uses : actions/setup-node@v3
65+ with :
66+ node-version : ' 16'
67+ registry-url : " https://registry.npmjs.org"
6868
6969 - name : Cache dependencies
7070 id : cache
7171 uses : actions/cache@v3
7272 with :
73- path : " **/node_modules"
73+ path : ' **/node_modules'
7474 key : ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
7575
7676 - name : Install dependencies
@@ -81,13 +81,13 @@ jobs:
8181 uses : felixmosh/turborepo-gh-artifacts@v2
8282 with :
8383 repo-token : ${{ secrets.GITHUB_TOKEN }}
84- server-token : ${{ secrets.TURBO_SERVER_TOKEN }}
84+ server-token : ${{ env.TURBO_TOKEN }}
8585
8686 - name : Version
87- run : yarn lerna version "$(node -e "console.log(require('semver').inc(require('./lerna.json').version, 'patch'))")-pre.${{ github.run_number }}" --yes
87+ run : yarn lerna version "$(node -e "console.log(require('semver').inc(require('./lerna.json').version, 'patch'))")-pre.${{ github.run_number }}" --no-git-tag-version --no-push -- yes
8888
8989 - name : Build
90- run : yarn turbo run build --color --concurrency=5
90+ run : yarn turbo build --color --concurrency=5
9191
9292 - run : git config user.email "<>" && git config user.name "UgandaEMR CI"
9393 - run : git add . && git commit -m "Prerelease version" --no-verify
9797 env :
9898 NODE_AUTH_TOKEN : ${{ secrets.NPM_AUTH_TOKEN }}
9999
100+ - name : Upload build artifacts
101+ uses : actions/upload-artifact@v3
102+ with :
103+ name : packages
104+ path : |
105+ packages/**/dist
106+
107+
100108 release :
101109 runs-on : ubuntu-latest
102110
@@ -106,13 +114,11 @@ jobs:
106114
107115 steps :
108116 - uses : actions/checkout@v3
109- - name : Download Artifacts
110- uses : actions/download-artifact@v3
111117 - name : Use Node.js
112118 uses : actions/setup-node@v3
113119 with :
114- node-version : " 18.x "
115- registry-url : ' https://registry.npmjs.org'
120+ node-version : ' 16 '
121+ registry-url : " https://registry.npmjs.org"
116122
117123 - name : Cache dependencies
118124 id : cache
@@ -125,7 +131,16 @@ jobs:
125131 if : steps.cache.outputs.cache-hit != 'true'
126132 run : yarn install --immutable
127133
128- - run : yarn turbo run build --color
129- - run : yarn run ci:publish
134+ - name : Setup local cache server for Turborepo
135+ uses : felixmosh/turborepo-gh-artifacts@v2
136+ with :
137+ repo-token : ${{ secrets.GITHUB_TOKEN }}
138+ server-token : ${{ env.TURBO_TOKEN }}
139+
140+ - name : Build
141+ run : yarn turbo build --color --concurrency=5
142+
143+ - name : Publish
144+ run : yarn run ci:publish
130145 env :
131146 NODE_AUTH_TOKEN : ${{ secrets.NPM_AUTH_TOKEN }}
0 commit comments