Skip to content

Commit 101ee47

Browse files
author
Amram Englander
committed
Fix publish: keep devDeps, strip playwright and prepare script
1 parent a36f025 commit 101ee47

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

.github/workflows/publish.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,17 @@ jobs:
1414
node-version: 22
1515
registry-url: https://registry.npmjs.org
1616

17-
- name: Install dependencies without playwright
17+
- name: Install dependencies
1818
run: |
1919
node -e "
20-
const pkg = require('./package.json');
20+
const pkg = JSON.parse(require('fs').readFileSync('package.json', 'utf8'));
2121
delete pkg.dependencies.playwright;
22-
delete pkg.devDependencies;
23-
require('fs').writeFileSync('package.json.bak', JSON.stringify(pkg, null, 2));
22+
delete pkg.scripts.prepare;
23+
require('fs').writeFileSync('package.json', JSON.stringify(pkg, null, 2));
2424
"
25-
cp package.json package.json.orig
26-
cp package.json.bak package.json
2725
rm -f package-lock.json
2826
npm install
29-
cp package.json.orig package.json
27+
git checkout package.json
3028
3129
- run: npm run build
3230

0 commit comments

Comments
 (0)