From 35370bbec6c3c80fa2c3277b3deaad3adeb7f109 Mon Sep 17 00:00:00 2001 From: Ned Twigg Date: Thu, 2 Oct 2025 09:20:52 -0700 Subject: [PATCH 1/4] We don't need `tabs` after all. --- wxt.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wxt.config.ts b/wxt.config.ts index bedd05b..86c4815 100644 --- a/wxt.config.ts +++ b/wxt.config.ts @@ -15,7 +15,7 @@ export default defineConfig({ 128: "/icons/icon-128.png", }, name: "Gitcasso", - permissions: ["activeTab", "tabs"], + permissions: ["activeTab"], version: "0.2.0", }, modules: ["@wxt-dev/webextension-polyfill"], From 65d12ab435bde3a3b57044e12495e6fba52313bf Mon Sep 17 00:00:00 2001 From: Ned Twigg Date: Thu, 2 Oct 2025 09:28:27 -0700 Subject: [PATCH 2/4] Set log level to DEBUG in dev, WARN in prod. --- src/lib/config.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/config.ts b/src/lib/config.ts index 1a1819a..3c02277 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -1,4 +1,4 @@ -const MODES = ["PROD", "PLAYGROUNDS_PR"] as const +const MODES = ["PROD"] as const export type ModeType = (typeof MODES)[number] @@ -8,6 +8,8 @@ export type LogLevel = (typeof LOG_LEVELS)[number] export const CONFIG = { EXTENSION_NAME: "gitcasso", // decorates logs - LOG_LEVEL: "DEBUG" satisfies LogLevel, + LOG_LEVEL: (import.meta.env.MODE === "production" + ? "WARN" + : "DEBUG") satisfies LogLevel, MODE: "PROD" satisfies ModeType, } as const From 77049de359cbe46924e548a1839dfe2f69d7c953 Mon Sep 17 00:00:00 2001 From: Ned Twigg Date: Thu, 2 Oct 2025 12:31:06 -0700 Subject: [PATCH 3/4] We can use `fetch-depth: 0` in CI. --- .github/workflows/browser-extension.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/browser-extension.yml b/.github/workflows/browser-extension.yml index 35685d8..c66bc50 100644 --- a/.github/workflows/browser-extension.yml +++ b/.github/workflows/browser-extension.yml @@ -13,6 +13,7 @@ jobs: - uses: actions/checkout@v5 with: submodules: recursive + fetch-depth: 0 - uses: pnpm/action-setup@v4 with: version: 10 From 0076ff45a3fe78575041a2f65a409e284334fde8 Mon Sep 17 00:00:00 2001 From: Ned Twigg Date: Thu, 2 Oct 2025 12:31:17 -0700 Subject: [PATCH 4/4] Add a script for running publish from CI. --- .github/workflows/deploy.yml | 45 ++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..67832d3 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,45 @@ +on: + workflow_dispatch: + inputs: + to_publish: + description: 'What to publish' + required: true + default: 'all' + type: choice + options: + - all + - chrome + - edge +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + with: + submodules: recursive + fetch-depth: 0 + - uses: pnpm/action-setup@v4 + with: + version: 10 + - uses: actions/setup-node@v5 + with: + node-version-file: '.nvmrc' + cache: 'pnpm' + - run: pnpm install --frozen-lockfile + - run: pnpm wxt zip + - name: wxt submit chrome + if: "${{ github.event.inputs.to_publish == 'all' || github.event.inputs.to_publish == 'chrome' }}" + run: pnpm wxt submit --chrome-zip .output/*-chrome.zip \ + env: + CHROME_EXTENSION_ID: ${{ secrets.CHROME_EXTENSION_ID }} + CHROME_CLIENT_ID: ${{ secrets.CHROME_CLIENT_ID }} + CHROME_CLIENT_SECRET: ${{ secrets.CHROME_CLIENT_SECRET }} + CHROME_REFRESH_TOKEN: ${{ secrets.CHROME_REFRESH_TOKEN }} + - name: wxt submit edge + if: "${{ github.event.inputs.to_publish == 'all' || github.event.inputs.to_publish == 'edge' }}" + run: pnpm wxt submit --edge-zip .output/*-chrome.zip \ + env: + EDGE_PRODUCT_ID: ${{ secrets.EDGE_PRODUCT_ID }} + EDGE_CLIENT_ID: ${{ secrets.EDGE_CLIENT_ID }} + EDGE_CLIENT_SECRET: ${{ secrets.EDGE_CLIENT_SECRET }} + EDGE_ACCESS_TOKEN_URL: ${{ secrets.EDGE_ACCESS_TOKEN_URL }} \ No newline at end of file