Skip to content

Commit

Permalink
Merge pull request #748 from webdriverio-community/sm/fix-ci-release
Browse files Browse the repository at this point in the history
fix(ci): pack after bump
  • Loading branch information
goosewobbler authored Aug 22, 2024
2 parents 63d29a8 + feb0bcc commit 89adaf7
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 23 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "wdio-electron-service-monorepo",
"private": true,
"type": "module",
"version": "7.0.1",
"version": "7.0.0",
"engines": {
"node": ">=18 || >=20"
},
Expand Down Expand Up @@ -35,7 +35,6 @@
"init-forge:apps:mac-universal": "tsx ./scripts/init-forge-apps.ts",
"lint": "cross-env eslint \"**/*.{j,mj,cj,t}s\"",
"lint:fix": "cross-env eslint \"**/*.{j,mj,cj,t}s\" --fix",
"package": "turbo run pack --filter=wdio-electron-service --filter=@wdio* --only",
"prepare": "husky",
"release": "turbo run release --filter=wdio-electron-service --filter=@wdio* --only --concurrency=1",
"test": "turbo run test:unit test:e2e",
Expand Down
10 changes: 10 additions & 0 deletions packages/@wdio_electron-types/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# WDIO Electron Types

<a href="https://www.npmjs.com/package/@wdio/electron-types" alt="NPM Version">
<img src="https://img.shields.io/npm/v/@wdio/electron-types" /></a>
<a href="https://www.npmjs.com/package/@wdio/electron-types" alt="NPM Downloads">
<img src="https://img.shields.io/npm/dw/@wdio/electron-types" /></a>

<br />

**Types for the [WDIO Electron Service](https://github.com/webdriverio-community/wdio-electron-service)**
6 changes: 4 additions & 2 deletions packages/@wdio_electron-types/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wdio/electron-types",
"version": "7.0.1",
"version": "7.0.0",
"description": "Types for WebdriverIO Electron Service",
"type": "module",
"types": "./dist/index.d.ts",
Expand All @@ -12,7 +12,6 @@
"clean": "pnpm clean:dist && pnpm dlx shx rm -rf ./node_modules pnpm-lock.yaml",
"clean:dist": "pnpm dlx shx rm -rf ./dist",
"build": "tsc",
"pack": "pnpm pack",
"release": "release-it --ci --npm.skipChecks --no-git.requireCleanWorkingDir"
},
"dependencies": {
Expand All @@ -34,6 +33,9 @@
"dist/*"
],
"release-it": {
"hooks": {
"after:bump": "pnpm pack"
},
"git": false,
"npm": {
"publish": true,
Expand Down
10 changes: 10 additions & 0 deletions packages/@wdio_electron-utils/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# WDIO Electron Utils

<a href="https://www.npmjs.com/package/@wdio/electron-utils" alt="NPM Version">
<img src="https://img.shields.io/npm/v/@wdio/electron-utils" /></a>
<a href="https://www.npmjs.com/package/@wdio/electron-utils" alt="NPM Downloads">
<img src="https://img.shields.io/npm/dw/@wdio/electron-utils" /></a>

<br />

**Utility Functions for the [WDIO Electron Service](https://github.com/webdriverio-community/wdio-electron-service)**
6 changes: 4 additions & 2 deletions packages/@wdio_electron-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wdio/electron-utils",
"version": "7.0.1",
"version": "7.0.0",
"description": "Utilities for WebdriverIO Electron Service",
"module": "dist/index.js",
"main": "dist/cjs/index.js",
Expand Down Expand Up @@ -33,7 +33,6 @@
"build": "pnpm build:esm && pnpm build:cjs",
"build:esm": "tsc --outDir dist",
"build:cjs": "tsc --build tsconfig.cjs.json",
"pack": "pnpm pack",
"release": "release-it --ci --npm.skipChecks --no-git.requireCleanWorkingDir",
"test:unit": "vitest --coverage --watch=false",
"test:dev": "vitest --coverage",
Expand All @@ -58,6 +57,9 @@
"vitest": "^2.0.5"
},
"release-it": {
"hooks": {
"after:bump": "pnpm pack"
},
"git": false,
"npm": {
"publish": true,
Expand Down
6 changes: 4 additions & 2 deletions packages/wdio-electron-service/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wdio-electron-service",
"version": "7.0.1",
"version": "7.0.0",
"description": "WebdriverIO service to enable Electron testing",
"author": "Sam Maister <[email protected]>",
"homepage": "https://github.com/webdriverio-community/wdio-electron-service",
Expand Down Expand Up @@ -50,7 +50,6 @@
"build:cjs": "pnpm build:cjs:copy && pnpm build:cjs:compile",
"build:cjs:copy": "cp -f ./src/preload.ts ./src/cjs/preload.ts && cp -f ./src/main.ts ./src/cjs/main.ts && cp -f ./src/constants.ts ./src/cjs/constants.ts",
"build:cjs:compile": "tsc --project tsconfig.cjs.json --outDir dist/cjs",
"pack": "pnpm pack",
"release": "release-it --ci --npm.skipChecks --no-git.requireCleanWorkingDir",
"test:unit": "vitest --coverage --watch=false",
"test:dev": "vitest --coverage",
Expand Down Expand Up @@ -113,6 +112,9 @@
"dist/*"
],
"release-it": {
"hooks": {
"after:bump": "pnpm pack"
},
"git": false,
"npm": {
"publish": true,
Expand Down
4 changes: 4 additions & 0 deletions scripts/release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,9 @@ import shell from 'shelljs';

const options = process.argv.slice(2).join(' ');

shell.cp(['README.md', 'LICENSE'], 'packages/wdio-electron-service');
shell.cp(['LICENSE'], 'packages/@wdio_electron-utils');
shell.cp(['LICENSE'], 'packages/@wdio_electron-types');

shell.exec(`pnpm run release -- ${options}`);
shell.exec(`release-it -VV ${options}`);
18 changes: 3 additions & 15 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,25 +62,17 @@
"dependsOn": ["//#lint", "//#format:check", "test:unit"],
"outputs": ["dist/**"]
},
"@wdio/electron-types#pack": {
"dependsOn": ["build"],
"cache": false
},
"@wdio/electron-types#release": {
"dependsOn": ["pack"],
"dependsOn": ["build"],
"cache": false,
"env": ["GITHUB_TOKEN", "NODE_AUTH_TOKEN"]
},
"@wdio/electron-utils#build": {
"dependsOn": ["@wdio/electron-types#build", "test:unit"],
"outputs": ["dist/**"]
},
"@wdio/electron-utils#pack": {
"dependsOn": ["build"],
"cache": false
},
"@wdio/electron-utils#release": {
"dependsOn": ["pack"],
"dependsOn": ["build"],
"cache": false,
"env": ["GITHUB_TOKEN", "NODE_AUTH_TOKEN"]
},
Expand Down Expand Up @@ -144,12 +136,8 @@
"dependsOn": ["@wdio/electron-utils#build", "test:unit"],
"outputs": ["dist/**"]
},
"wdio-electron-service#pack": {
"dependsOn": ["build"],
"cache": false
},
"wdio-electron-service#release": {
"dependsOn": ["pack"],
"dependsOn": ["build"],
"cache": false,
"env": ["GITHUB_TOKEN", "NODE_AUTH_TOKEN"]
}
Expand Down

0 comments on commit 89adaf7

Please sign in to comment.