Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/browser-extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
- uses: actions/checkout@v5
with:
submodules: recursive
fetch-depth: 0
- uses: pnpm/action-setup@v4
with:
version: 10
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -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 }}
6 changes: 4 additions & 2 deletions src/lib/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const MODES = ["PROD", "PLAYGROUNDS_PR"] as const
const MODES = ["PROD"] as const

export type ModeType = (typeof MODES)[number]

Expand All @@ -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
2 changes: 1 addition & 1 deletion wxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down