@@ -236,7 +236,7 @@ jobs:
236
236
typescript-version :
237
237
- ${{ needs.preflight.outputs.version-typescript }}
238
238
- latest
239
- - ~4.9.0
239
+ - 5.0.4
240
240
steps :
241
241
- id : checkout
242
242
name : Checkout ${{ env.REF_NAME }}
@@ -268,15 +268,10 @@ jobs:
268
268
if : steps.test-files-check.outputs.files_exists == 'true'
269
269
name : Install typescript@${{ matrix.typescript-version }}
270
270
run : yarn add -D typescript@${{ matrix.typescript-version }}
271
- - id : set-typescript-version
272
- if : steps.test-files-check.outputs.files_exists == 'true'
273
- name : Set env.TYPESCRIPT_VERSION
274
- run : |
275
- echo "TYPESCRIPT_VERSION=$(jq .devDependencies.typescript package.json -r)" >>$GITHUB_ENV
276
271
- id : print-typescript-version
277
272
if : steps.test-files-check.outputs.files_exists == 'true'
278
273
name : Print TypeScript version
279
- run : echo $TYPESCRIPT_VERSION
274
+ run : jq .devDependencies.typescript package.json -r
280
275
- id : typecheck
281
276
if : steps.test-files-check.outputs.files_exists == 'true'
282
277
name : Run typecheck
@@ -352,6 +347,10 @@ jobs:
352
347
- gitguardian
353
348
- preflight
354
349
runs-on : ubuntu-latest
350
+ env :
351
+ TARFILE : |
352
+ ${{ startsWith(github.ref_name, 'release/') && format('@{0}-{1}-{2}.tgz', github.repository_owner, github.event.repository.name, needs.preflight.outputs.version)
353
+ || format('@{0}-{1}-{2}+{3}.tgz', github.repository_owner, github.event.repository.name, needs.preflight.outputs.version, github.event.pull_request.head.sha || github.sha) }}
355
354
steps :
356
355
- id : checkout
357
356
name : Checkout ${{ env.REF_NAME }}
@@ -372,19 +371,24 @@ jobs:
372
371
with :
373
372
key : ${{ runner.os }}-${{ github.run_id }}
374
373
path : ${{ env.CACHE_PATH }}
374
+ - id : local-binaries
375
+ name : Add local binaries to $PATH
376
+ run : echo "$GITHUB_WORKSPACE/$CACHE_PATH/.bin" >> $GITHUB_PATH
375
377
- id : pack
376
378
name : Pack project
377
- run : yarn pack -o %s-%v.tgz
379
+ run : yarn pack -o ${{ env.TARFILE }}
378
380
- id : typecheck
379
381
name : Run typecheck
380
382
run : yarn check:types:build
383
+ - id : attw
384
+ name : Analyze types distribution
385
+ run : attw ${{ env.TARFILE }}
381
386
- id : pkg-size-report
382
387
name : Package size report
383
388
run : yarn pkg-size
384
389
- id : archive
385
390
name : Archive production artifacts
386
391
387
392
with :
388
- name : |
389
- ${{ format('@{0}-{1}-{2}', github.repository_owner, github.event.repository.name, needs.preflight.outputs.version) }}
390
- path : ' *.tgz'
393
+ name : ${{ env.TARFILE }}
394
+ path : ${{ env.TARFILE }}
0 commit comments