This repository was archived by the owner on Aug 6, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +44
-11
lines changed Expand file tree Collapse file tree 4 files changed +44
-11
lines changed Original file line number Diff line number Diff line change 4040 uses : actions/setup-node@master
4141 with :
4242 node-version : ${{ matrix.node }}
43- env :
44- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
4543
4644 - name : Update to npm 7
4745 run : npm i -g npm@7 --registry=https://registry.npmjs.org
@@ -76,11 +74,20 @@ jobs:
7674 NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
7775 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
7876
77+ - name : Set flag as to whether we released
78+ id : did-release
79+ run : echo "::set-output name=released::$(node ./playwright-test/check-package.js)"
80+
81+ - name : Setup node for second publish
82+ uses : actions/setup-node@master
83+ if : ${{ matrix.node == '14' && matrix.playwright == 'latest' && steps.did-release.outputs.released == 'true' }}
84+ with :
85+ node-version : ${{ matrix.node }}
86+ env :
87+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
88+
7989 - name : Upload Coverage / Release / Playwright Test
90+ if : ${{ matrix.node == '14' && matrix.playwright == 'latest' && steps.did-release.outputs.released == 'true' }}
8091 run : |
8192 npm run prepare:playwright-test
8293 npm publish
83- if : ${{ matrix.node == '14' && matrix.playwright == 'latest' }}
84- env :
85- NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
86- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env node
2+ /* eslint-disable no-console */
3+
4+ const fs = require ( 'fs/promises' )
5+ const path = require ( 'path' )
6+ const process = require ( 'process' )
7+
8+ const PACKAGE = path . join ( __dirname , '..' , 'package.json' )
9+
10+ const run = async ( ) => {
11+ const package = JSON . parse ( await fs . readFile ( PACKAGE , { encoding : 'utf-8' } ) )
12+
13+ process . stdout . write ( JSON . stringify ( package . version !== '0.0.0-semantically-released' ) )
14+ }
15+
16+ run ( )
17+ . then ( ( ) => process . exit ( 0 ) )
18+ . catch ( error => {
19+ console . error ( error )
20+ process . exit ( 1 )
21+ } )
Original file line number Diff line number Diff line change 1+ const fs = require ( 'fs/promises' )
2+ const path = require ( 'path' )
3+
4+ const PACKAGE = path . join ( __dirname , '..' , 'package.json' )
5+
6+ const getPackage = async ( ) => JSON . parse ( await fs . readFile ( PACKAGE , { encoding : 'utf-8' } ) )
7+
8+ module . exports = { PACKAGE , getPackage}
Original file line number Diff line number Diff line change 22/* eslint-disable no-console */
33
44const fs = require ( 'fs/promises' )
5- const path = require ( 'path' )
65
7- const PACKAGE = path . join ( __dirname , '..' , ' package.json ')
6+ const { PACKAGE , getPackage } = require ( './ package')
87
98const run = async ( ) => {
10- const package = JSON . parse ( await fs . readFile ( PACKAGE , { encoding : 'utf-8' } ) )
11-
129 const modifiedPackage = {
13- ...package ,
10+ ...getPackage ( ) ,
1411 name : '@playwright-testing-library/test' ,
1512 }
1613
You can’t perform that action at this time.
0 commit comments