Compare commits

..
10 Commits
Author SHA1 Message Date
wt 5cbada02c3 Merge pull request 'added screenshots and fix manifest.json' (#5) from develop into main
Build and publish extension / Build extension packages (push) Successful in 54s
Build and publish extension / Publish stores and attach release assets (push) Skipped
Build and publish extension / Publish stores and attach release assets (release) Canceled after 0s
Build and publish extension / Build extension packages (release) Canceled after 10s
Reviewed-on: #5
2026-10-09 17:48:13 +07:00
wt 41456c5c0f added screenshots and fix manifest.json
Build and publish extension / Publish stores and attach release assets (push) Canceled after 0s
Build and publish extension / Build extension packages (push) Canceled after 32s
2026-10-09 17:46:46 +07:00
wt 427a1875f4 Merge pull request 'updated LICENSE and fix ci/cd №3' (#4) from develop into main
Build and publish extension / Build extension packages (push) Successful in 54s
Build and publish extension / Publish stores and attach release assets (push) Skipped
Build and publish extension / Build extension packages (release) Successful in 2m46s
Build and publish extension / Publish stores and attach release assets (release) Canceled after 9m37s
Reviewed-on: #4
2026-10-09 17:32:39 +07:00
wt dd50029bc5 updated LICENSE and fix ci/cd №3
Build and publish extension / Build extension packages (push) Successful in 1m35s
Build and publish extension / Publish stores and attach release assets (push) Skipped
2026-10-09 17:30:31 +07:00
wt cd9d7c02cc Merge pull request 'fix ci/cd №2' (#3) from develop into main
Build and publish extension / Build extension packages (push) Successful in 50s
Build and publish extension / Publish stores and attach release assets (push) Skipped
Build and publish extension / Build extension packages (release) Successful in 51s
Build and publish extension / Publish stores and attach release assets (release) Failing after 40s
Reviewed-on: #3
2026-10-09 17:16:20 +07:00
wt 4dd5f48e3b fix ci/cd №2
Build and publish extension / Build extension packages (push) Successful in 1m1s
Build and publish extension / Publish stores and attach release assets (push) Skipped
2026-10-09 17:14:57 +07:00
wt 2067b7f94c Merge pull request 'fix ci/cd' (#2) from develop into main
Build and publish extension / Build extension packages (push) Successful in 52s
Build and publish extension / Publish stores and attach release assets (push) Skipped
Build and publish extension / Build extension packages (release) Successful in 51s
Build and publish extension / Publish stores and attach release assets (release) Failing after 38s
Reviewed-on: #2
2026-10-09 17:03:29 +07:00
wt 9e2ef513a0 fix ci/cd
Build and publish extension / Build extension packages (push) Successful in 51s
Build and publish extension / Publish stores and attach release assets (push) Skipped
2026-10-09 17:01:22 +07:00
wt 5dcd170d74 Merge pull request 'fix error if no secrets/credentials' (#1) from develop into main
Build and publish extension / Build extension packages (push) Successful in 52s
Build and publish extension / Publish stores and attach release assets (push) Skipped
Build and publish extension / Publish stores and attach release assets (release) Canceled after 0s
Build and publish extension / Build extension packages (release) Canceled after 33s
Reviewed-on: #1
2026-10-09 16:55:16 +07:00
wt 319bcdefbd fix error if no secrets/credentials
Build and publish extension / Build extension packages (push) Successful in 50s
Build and publish extension / Publish stores and attach release assets (push) Skipped
2026-10-09 16:54:27 +07:00
9 changed files with 94 additions and 12 deletions

No files matched your search

+45 -10
View File
@@ -48,7 +48,7 @@ jobs:
actual = json.load(open(path, encoding="utf-8"))["version"] actual = json.load(open(path, encoding="utf-8"))["version"]
if actual != expected: if actual != expected:
raise SystemExit(f"{path}: version {actual!r} does not match release {expected!r}") raise SystemExit(f"{path}: version {actual!r} does not match release {expected!r}")
if not re.fullmatch(r"\d+(\.\d+){1,3}", expected): if not re.fullmatch(r"\d+(\.\d+){0,3}", expected):
raise SystemExit(f"Release version must be numeric, got {expected!r}") raise SystemExit(f"Release version must be numeric, got {expected!r}")
PY PY
@@ -117,6 +117,26 @@ jobs:
with: with:
ref: ${{ github.event.release.tag_name }} ref: ${{ github.event.release.tag_name }}
- name: Check store credentials
id: credentials
run: |
python - <<'PY'
import os
stores = {
'firefox': ('AMO_JWT_ISSUER', 'AMO_JWT_SECRET'),
'chrome': ('CWS_PUBLISHER_ID', 'CWS_EXTENSION_ID', 'CWS_CLIENT_ID',
'CWS_CLIENT_SECRET', 'CWS_REFRESH_TOKEN'),
}
with open(os.environ['GITHUB_OUTPUT'], 'a') as output:
for store, names in stores.items():
missing = [name for name in names if not os.environ.get(name, '').strip()]
output.write(f"{store}={'false' if missing else 'true'}\n")
if missing:
print(f"Skipping {store} deployment: missing credentials: {', '.join(missing)}")
else:
print(f"{store} deployment enabled")
PY
- name: Set up Node.js - name: Set up Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
@@ -129,6 +149,7 @@ jobs:
path: dist/packages path: dist/packages
- name: Set up Firefox signing tools - name: Set up Firefox signing tools
if: steps.credentials.outputs.firefox == 'true'
run: | run: |
npm install --global web-ext npm install --global web-ext
python - <<'PY' python - <<'PY'
@@ -151,6 +172,7 @@ jobs:
PY PY
- name: Sign and submit Firefox package to AMO - name: Sign and submit Firefox package to AMO
if: steps.credentials.outputs.firefox == 'true'
run: | run: |
test -n "$AMO_JWT_ISSUER" || { echo 'Missing AMO_JWT_ISSUER secret'; exit 1; } test -n "$AMO_JWT_ISSUER" || { echo 'Missing AMO_JWT_ISSUER secret'; exit 1; }
test -n "$AMO_JWT_SECRET" || { echo 'Missing AMO_JWT_SECRET secret'; exit 1; } test -n "$AMO_JWT_SECRET" || { echo 'Missing AMO_JWT_SECRET secret'; exit 1; }
@@ -159,6 +181,7 @@ jobs:
--artifacts-dir dist/firefox-signed \ --artifacts-dir dist/firefox-signed \
--api-key "$AMO_JWT_ISSUER" \ --api-key "$AMO_JWT_ISSUER" \
--api-secret "$AMO_JWT_SECRET" \ --api-secret "$AMO_JWT_SECRET" \
--amo-metadata amo-metadata.json \
--channel listed \ --channel listed \
--approval-timeout 900000 \ --approval-timeout 900000 \
--no-input --no-input
@@ -167,6 +190,7 @@ jobs:
cp "$firefox_xpi" dist/packages/proxyswitcherforkbywt-firefox-signed.xpi cp "$firefox_xpi" dist/packages/proxyswitcherforkbywt-firefox-signed.xpi
- name: Upload Chrome package to Chrome Web Store - name: Upload Chrome package to Chrome Web Store
if: steps.credentials.outputs.chrome == 'true'
run: | run: |
set -euo pipefail set -euo pipefail
for name in CWS_PUBLISHER_ID CWS_EXTENSION_ID CWS_CLIENT_ID CWS_CLIENT_SECRET CWS_REFRESH_TOKEN; do for name in CWS_PUBLISHER_ID CWS_EXTENSION_ID CWS_CLIENT_ID CWS_CLIENT_SECRET CWS_REFRESH_TOKEN; do
@@ -191,20 +215,31 @@ jobs:
-H "Authorization: Bearer $token" \ -H "Authorization: Bearer $token" \
"https://chromewebstore.googleapis.com/v2/publishers/$CWS_PUBLISHER_ID/items/$CWS_EXTENSION_ID:publish" "https://chromewebstore.googleapis.com/v2/publishers/$CWS_PUBLISHER_ID/items/$CWS_EXTENSION_ID:publish"
- name: Attach signed Firefox and Chrome packages to release - name: Prepare release assets
run: |
mkdir -p dist/release-assets
chrome_zip=$(find dist/packages -name 'proxyswitcherforkbywt-chrome.zip' -print -quit)
test -f "$chrome_zip"
cp "$chrome_zip" dist/release-assets/
firefox_xpi=dist/packages/proxyswitcherforkbywt-firefox-signed.xpi
if [ ! -f "$firefox_xpi" ]; then
firefox_xpi=$(find dist/packages -name 'proxyswitcherforkbywt-firefox.xpi' -print -quit)
fi
test -f "$firefox_xpi"
cp "$firefox_xpi" dist/release-assets/
- name: Attach Firefox and Chrome packages to release
env: env:
GH_TOKEN: ${{ github.token }} GH_TOKEN: ${{ github.token }}
RELEASE_TAG: ${{ github.event.release.tag_name }}
run: | run: |
gh release upload "${{ github.event.release.tag_name }}" \ gh release upload "$RELEASE_TAG" \
dist/packages/proxyswitcherforkbywt-firefox-signed.xpi \ dist/release-assets/* \
"$chrome_zip" \
--clobber --clobber
- name: Upload signed packages as workflow artifacts - name: Upload release packages as workflow artifacts
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: signed-extension-packages-${{ github.event.release.tag_name }} name: release-extension-packages-${{ github.event.release.tag_name }}
if-no-files-found: error if-no-files-found: error
path: | path: dist/release-assets/*
dist/packages/proxyswitcherforkbywt-firefox-signed.xpi
dist/packages/**/proxyswitcherforkbywt-chrome.zip
+2
View File
@@ -30,6 +30,8 @@ This repository contains the Firefox WebExtension **Proxy Switcher Fork By WT**.
- Never hand-edit or retain stale `META-INF` signatures after changing files. Build artifacts must be signed again before distribution. - Never hand-edit or retain stale `META-INF` signatures after changing files. Build artifacts must be signed again before distribution.
- Do not commit generated `web-ext-artifacts/` packages unless explicitly requested. - Do not commit generated `web-ext-artifacts/` packages unless explicitly requested.
- Keep publishing credentials only in GitHub Secrets. The release workflow expects AMO JWT credentials and Chrome Web Store OAuth credentials. - Keep publishing credentials only in GitHub Secrets. The release workflow expects AMO JWT credentials and Chrome Web Store OAuth credentials.
- Keep `amo-metadata.json` valid for AMO listed submissions; keep `version.license` consistent with the MIT `LICENSE` file.
- Missing or incomplete store credentials must skip only that store's deployment. Keep package builds, release assets, and workflow artifacts available without store credentials.
## Validation ## Validation
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2026 WT
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+9 -1
View File
@@ -104,7 +104,11 @@ Configure these repository or environment secrets before publishing:
- `CWS_PUBLISHER_ID` and `CWS_EXTENSION_ID` — Chrome Web Store publisher and existing item IDs. - `CWS_PUBLISHER_ID` and `CWS_EXTENSION_ID` — Chrome Web Store publisher and existing item IDs.
- `CWS_CLIENT_ID`, `CWS_CLIENT_SECRET`, and `CWS_REFRESH_TOKEN` — Google OAuth credentials with Chrome Web Store API access. - `CWS_CLIENT_ID`, `CWS_CLIENT_SECRET`, and `CWS_REFRESH_TOKEN` — Google OAuth credentials with Chrome Web Store API access.
The stores must already contain their initial listings and required privacy information. Store review still applies; the workflow submits the update and does not bypass review. Never commit any of these credentials. Each store is optional: deployment runs only when its full set of credentials is present. Missing or incomplete credentials skip that store without failing the workflow or skipping the other store. Both packages are still built and attached to the release. If Firefox deployment is skipped, the release contains the unsigned Firefox XPI for development instead of a signed XPI. Invalid credentials or actual store API failures still fail the deployment step.
AMO can create the initial listing automatically from `amo-metadata.json` through `web-ext sign --channel listed`; manually uploading the first Firefox version is not required. Chrome Web Store requires an existing item and completed listing/privacy information. Store review still applies; the workflow submits the update and does not bypass review. Never commit any of these credentials.
The Firefox workflow passes [`amo-metadata.json`](amo-metadata.json) to AMO. It declares the MIT license, categories, and listing metadata for a listed submission.
To remove generated packages: To remove generated packages:
@@ -125,3 +129,7 @@ python -m json.tool manifest.json >/dev/null
## Project version ## Project version
Current version: **20261009** Current version: **20261009**
## License
Distributed under the [MIT License](LICENSE).
+16
View File
@@ -0,0 +1,16 @@
{
"version": {
"license": "MIT"
},
"default_locale": "en-US",
"name": {
"en-US": "Proxy Switcher Fork By WT"
},
"categories": {
"firefox": ["other"],
"android": ["other"]
},
"summary": {
"en-US": "Route selected domains through HTTP or SOCKS5 proxy servers."
}
}
+1 -1
View File
@@ -35,7 +35,7 @@
}, },
"browser_specific_settings": { "browser_specific_settings": {
"gecko": { "gecko": {
"id": "proxy-switcher-for-by-wt@9c0b2d3d", "id": "proxy-switcher-fork-by-wt@9c0b2d3d",
"strict_min_version": "91.1.0" "strict_min_version": "91.1.0"
}, },
"gecko_android": { "gecko_android": {
Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB