Skip to content

Commit e1b9b3e

Browse files
committed
feat: ready for v3
1 parent 29de112 commit e1b9b3e

18 files changed

+172
-102
lines changed

.github/workflows/deploy-staging.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
${{ runner.os }}-
2626
- uses: pnpm/[email protected]
2727
with:
28-
version: 7.11.0
28+
version: 7.12.2
2929
run_install: true
3030
- name: Use Node.js 16.x
3131
uses: actions/[email protected]

.github/workflows/deploy-v.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Major version rolling deployment
33

44
# Bump this version accordingly as the action matures
55
env:
6-
VERSION: v2
6+
VERSION: v3
77

88
on:
99
workflow_dispatch:

.github/workflows/pr-test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
${{ runner.os }}-
2222
- uses: pnpm/[email protected]
2323
with:
24-
version: 7.11.0
24+
version: 7.12.2
2525
run_install: true
2626
- name: Use Node.js 16.x
2727
uses: actions/[email protected]

.gitmodules

-3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,3 @@
1313
[submodule "packages/safari-webstore-api"]
1414
path = packages/safari-webstore-api
1515
url = [email protected]:PlasmoHQ/safari-webstore-api.git
16-
[submodule "packages/itero-testbed-api"]
17-
path = packages/itero-testbed-api
18-
url = https://github.com/PlasmoHQ/itero-testbed-api.git

README.md

+10-11
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,21 @@
2424

2525
# Browser Platform Publisher
2626

27-
A GitHub action from [plasmo](https://www.plasmo.com/) to publish your browser extension to every web store/add-ons marketplace. This action and its dependencies are fully open-source under the MIT license. The core modules are:
27+
A GitHub action from [Plasmo](https://www.plasmo.com/) to publish your browser extension to every web store/add-ons marketplace. This action and its dependencies are MIT licensed. The core modules are:
2828

2929
- [Browser Market Submit](https://github.com/PlasmoHQ/bms)
30-
- [Mozilla Webstore Upload](https://www.npmjs.com/package/@plasmo-corp/mwu)
31-
- [Chrome Webstore Upload](https://www.npmjs.com/package/@plasmo-corp/cwu)
32-
- [Edge Webstore Upload](https://www.npmjs.com/package/@plasmo-corp/ewu)
33-
34-
The action is updated regularly and tested in [cex](https://github.com/PlasmoHQ/cex/actions)
30+
- [Chrome Webstore API](https://github.com/PlasmoHQ/chrome-webstore-api)
31+
- [Mozilla Addons API](https://github.com/PlasmoHQ/mozilla-addons-api)
32+
- [Edge Addons API](https://github.com/PlasmoHQ/edge-addons-api)
33+
- [Itero TestBed API](https://github.com/PlasmoHQ/itero-testbed-api)
3534

3635
## Usage
3736

3837
First, create a `keys.json` in your favorite text editor (preferably one that supports [json-schema](https://json-schema.org/)):
3938

4039
```json
4140
{
42-
"$schema": "https://raw.githubusercontent.com/PlasmoHQ/bpp/v2/keys.schema.json"
41+
"$schema": "https://raw.githubusercontent.com/PlasmoHQ/bpp/v3/keys.schema.json"
4342
}
4443
```
4544

@@ -52,17 +51,17 @@ Copy the content of your `keys.json` into a github secret with a name of your ch
5251
```yaml
5352
steps:
5453
- name: Browser Platform Publish
55-
uses: PlasmoHQ/bpp@v2
54+
uses: PlasmoHQ/bpp@v3
5655
with:
5756
keys: ${{ secrets.BPP_KEYS }}
5857
```
5958
60-
**NOTE**: If you skipped the `zip` parameter in your keys, and your extension artifact is understood by the browser you specified, you can specify an `artifact` action parameter:
59+
**NOTE**: If you skipped the `zip` parameter in your keys, and your extension artifact is understood by the browser you specified, you can declare an `artifact` action parameter:
6160

6261
```yaml
6362
steps:
6463
- name: Browser Platform Publish
65-
uses: PlasmoHQ/bpp@v2
64+
uses: PlasmoHQ/bpp@v3
6665
with:
6766
artifact: build/artifact.zip
6867
keys: ${{ secrets.BPP_KEYS }}
@@ -76,4 +75,4 @@ Join the [Discord channel](https://www.plasmo.com/s/d)!
7675

7776
# License
7877

79-
[MIT](./license) ⭐ [Plasmo Corp.](https://plasmo.com)
78+
[MIT](./LICENSE) ⭐ [Plasmo Corp.](https://plasmo.com)

keys.schema.json

+19
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,28 @@
1616
},
1717
"edge": {
1818
"$ref": "#/definitions/Edge"
19+
},
20+
"itero": {
21+
"$ref": "#/definitions/Itero"
1922
}
2023
}
2124
},
25+
"Itero": {
26+
"description": "Generated the submit token from the Itero Dashboard: https://itero.plasmo.com/",
27+
"type": "object",
28+
"properties": {
29+
"privateKey": {
30+
"type": "string"
31+
},
32+
"token": {
33+
"type": "string"
34+
},
35+
"userId": {
36+
"type": "string"
37+
}
38+
},
39+
"required": ["privateKey", "token", "userId"]
40+
},
2241
"Chrome": {
2342
"description": "For refreshToken and clientId, follow: https://github.com/PlasmoHQ/chrome-webstore-api/blob/main/token.md",
2443
"type": "object",

keys.template.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
"productId": "aaaaaaa-aaaa-bbbb-cccc-dddddddddddd",
1818
"accessTokenUrl": "https://login.microsoftonline.com/aaaaaaa-aaaa-bbbb-cccc-dddddddddddd/oauth2/v2.0/token"
1919
},
20-
"opera": {
21-
"packageId": "123",
22-
"csrftoken": "abcd",
23-
"sessionid": "abcd"
20+
"itero": {
21+
"privateKey": "",
22+
"token": "",
23+
"userId": ""
2424
}
2525
}

package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22
"name": "p1asm0-bpp",
33
"private": true,
44
"workspaces": [
5-
"packages/*",
6-
"!packages/itero-testbed-api"
5+
"packages/*"
76
],
87
"scripts": {
9-
"build": "turbo run build",
8+
"build": "turbo run build --filter=\"!@plasmohq/safari-*\"",
109
"package": "turbo run package --filter=@plasmo/bpp",
1110
"publish": "pnpm --filter=\"@plasmohq/**\" publish",
12-
"v": "pnpm --filter \"./packages/**\" --parallel -r exec pnpm version"
11+
"v": "pnpm --filter \"./packages/**\" --parallel -r exec pnpm version",
12+
"status": "pnpm --filter \"./packages/**\" --parallel -r exec git remote -v"
1313
},
1414
"devDependencies": {
1515
"@plasmohq/prettier-plugin-sort-imports": "3.5.2",
1616
"esbuild": "0.15.9",
1717
"prettier": "2.7.1",
18-
"turbo": "1.5.3"
18+
"turbo": "1.5.4"
1919
},
2020
"packageManager": "[email protected]"
2121
}

packages/bpp/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@plasmo/bpp",
3-
"version": "2.6.2",
3+
"version": "3.0.0",
44
"private": true,
55
"description": "Browser Platform Publisher",
66
"main": "lib/main.js",
@@ -43,6 +43,6 @@
4343
"js-yaml": "4.1.0",
4444
"prettier": "2.7.1",
4545
"ts-jest": "29.0.2",
46-
"typescript": "4.8.3"
46+
"typescript": "4.8.4"
4747
}
4848
}

packages/bpp/src/main.ts

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
import { debug, getInput, info, setFailed, warning } from "@actions/core"
2-
import type {
3-
ChromeOptions,
4-
EdgeOptions,
5-
FirefoxOptions,
6-
OperaOptions
7-
} from "@plasmohq/bms"
82
import {
93
BrowserName,
4+
type ChromeOptions,
5+
type EdgeOptions,
6+
type FirefoxOptions,
7+
type IteroOptions,
8+
type OperaOptions,
109
submitChrome,
1110
submitEdge,
1211
submitFirefox,
13-
submitOpera,
12+
submitItero,
1413
supportedBrowserSet
1514
} from "@plasmohq/bms"
1615

@@ -19,6 +18,7 @@ type Keys = {
1918
[BrowserName.Firefox]: FirefoxOptions
2019
[BrowserName.Opera]: OperaOptions
2120
[BrowserName.Edge]: EdgeOptions
21+
[BrowserName.Itero]: IteroOptions
2222
}
2323

2424
const tag = (prefix: string) => `${prefix.padEnd(9)} |`
@@ -94,10 +94,10 @@ async function run(): Promise<void> {
9494
return submitChrome(keys[browser])
9595
case BrowserName.Firefox:
9696
return submitFirefox(keys[browser])
97-
case BrowserName.Opera:
98-
return submitOpera(keys[browser])
9997
case BrowserName.Edge:
10098
return submitEdge(keys[browser])
99+
case BrowserName.Itero:
100+
return submitItero(keys[browser])
101101
}
102102
})
103103

packages/edge-addons-api

packages/itero-testbed-api

-1
This file was deleted.

0 commit comments

Comments
 (0)