diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index c84979a..769566d 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -19,6 +19,7 @@ jobs: with: version: latest - run: pnpm install --ignore-scripts + - run: pnpm wxt prepare - run: pnpm run lint - run: pnpm run tsc @@ -34,7 +35,6 @@ jobs: with: version: latest - run: pnpm install --ignore-scripts - - run: pnpm zip - run: pnpx semantic-release env: GH_TOKEN: ${{ secrets.WEB_CHAT_GITHUB_TOKEN }} diff --git a/.releaserc b/.releaserc index 2818778..b5ae0b4 100644 --- a/.releaserc +++ b/.releaserc @@ -1,11 +1,26 @@ { - "branches": ["master"], + "branches": [ + "master" + ], "plugins": [ "@semantic-release/commit-analyzer", "@semantic-release/release-notes-generator", "@semantic-release/changelog", "@semantic-release/github", + [ + "@semantic-release/exec", + { + "prepareCmd": "pnpm run pack:chrome" + } + ], + { + "assets": [ + { + "path": ".output/web-chat-{{nextRelease.version}}-chrome.zip", + "label": "Release ZIP" + } + ] + }, "@semantic-release/git" ] } - diff --git a/package.json b/package.json index cea45b7..1168f9b 100644 --- a/package.json +++ b/package.json @@ -6,19 +6,17 @@ "type": "module", "scripts": { "dev": "wxt", - "dev:server": "y-webrtc-signaling", "dev:firefox": "wxt -b firefox", "build": "wxt build", "build:firefox": "wxt build -b firefox", "pack": "cross-env NODE_ENV=production run-p pack:*", - "pack:zip": "wxt zip", + "pack:chrome": "wxt zip -b firefox", "pack:firefox": "wxt zip -b firefox", "lint": "eslint --fix --flag unstable_ts_config", "clear": "rimraf .output", "tsc": "tsc --noEmit", "prepare": "husky", - "postinstall": "wxt prepare", - "zip": "wxt zip" + "postinstall": "wxt prepare" }, "repository": { "type": "git", @@ -97,6 +95,7 @@ "@eslint-react/eslint-plugin": "^1.14.2", "@eslint/js": "^9.11.1", "@semantic-release/changelog": "^6.0.3", + "@semantic-release/exec": "^6.0.3", "@semantic-release/git": "^10.0.1", "@types/eslint": "^9.6.1", "@types/eslint-plugin-tailwindcss": "^3.17.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4723786..eff4fe5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -159,6 +159,9 @@ importers: '@semantic-release/changelog': specifier: ^6.0.3 version: 6.0.3(semantic-release@24.1.1(typescript@5.6.2)) + '@semantic-release/exec': + specifier: ^6.0.3 + version: 6.0.3(semantic-release@24.1.1(typescript@5.6.2)) '@semantic-release/git': specifier: ^10.0.1 version: 10.0.1(semantic-release@24.1.1(typescript@5.6.2)) @@ -1865,6 +1868,12 @@ packages: resolution: {integrity: sha512-mgdxrHTLOjOddRVYIYDo0fR3/v61GNN1YGkfbrjuIKg/uMgCd+Qzo3UAXJ+woLQQpos4pl5Esuw5A7AoNlzjUQ==} engines: {node: '>=18'} + '@semantic-release/exec@6.0.3': + resolution: {integrity: sha512-bxAq8vLOw76aV89vxxICecEa8jfaWwYITw6X74zzlO0mc/Bgieqx9kBRz9z96pHectiTAtsCwsQcUyLYWnp3VQ==} + engines: {node: '>=14.17'} + peerDependencies: + semantic-release: '>=18.0.0' + '@semantic-release/git@10.0.1': resolution: {integrity: sha512-eWrx5KguUcU2wUPaO6sfvZI0wPafUKAMNC18aXY4EnNcrZL86dEmpNVnC9uMpGZkmZJ9EfCVJBQx4pV4EMGT1w==} engines: {node: '>=14.17'} @@ -8644,6 +8653,18 @@ snapshots: '@semantic-release/error@4.0.0': {} + '@semantic-release/exec@6.0.3(semantic-release@24.1.1(typescript@5.6.2))': + dependencies: + '@semantic-release/error': 3.0.0 + aggregate-error: 3.1.0 + debug: 4.3.7 + execa: 5.1.1 + lodash: 4.17.21 + parse-json: 5.2.0 + semantic-release: 24.1.1(typescript@5.6.2) + transitivePeerDependencies: + - supports-color + '@semantic-release/git@10.0.1(semantic-release@24.1.1(typescript@5.6.2))': dependencies: '@semantic-release/error': 3.0.0 diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json deleted file mode 100644 index a9a4743..0000000 --- a/tsconfig.eslint.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "./tsconfig.json", - "include": ["**/*.ts", "**/*.js", "**/*.tsx", "**/*.jsx"] -}