Skip to content

Commit 93a30a9

Browse files
authored
Prepare release infra for 1.0 (#103)
2 parents d9eb425 + 0076ff4 commit 93a30a9

File tree

4 files changed

+51
-3
lines changed

4 files changed

+51
-3
lines changed

.github/workflows/browser-extension.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
- uses: actions/checkout@v5
1414
with:
1515
submodules: recursive
16+
fetch-depth: 0
1617
- uses: pnpm/action-setup@v4
1718
with:
1819
version: 10

.github/workflows/deploy.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
on:
2+
workflow_dispatch:
3+
inputs:
4+
to_publish:
5+
description: 'What to publish'
6+
required: true
7+
default: 'all'
8+
type: choice
9+
options:
10+
- all
11+
- chrome
12+
- edge
13+
jobs:
14+
deploy:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v5
18+
with:
19+
submodules: recursive
20+
fetch-depth: 0
21+
- uses: pnpm/action-setup@v4
22+
with:
23+
version: 10
24+
- uses: actions/setup-node@v5
25+
with:
26+
node-version-file: '.nvmrc'
27+
cache: 'pnpm'
28+
- run: pnpm install --frozen-lockfile
29+
- run: pnpm wxt zip
30+
- name: wxt submit chrome
31+
if: "${{ github.event.inputs.to_publish == 'all' || github.event.inputs.to_publish == 'chrome' }}"
32+
run: pnpm wxt submit --chrome-zip .output/*-chrome.zip \
33+
env:
34+
CHROME_EXTENSION_ID: ${{ secrets.CHROME_EXTENSION_ID }}
35+
CHROME_CLIENT_ID: ${{ secrets.CHROME_CLIENT_ID }}
36+
CHROME_CLIENT_SECRET: ${{ secrets.CHROME_CLIENT_SECRET }}
37+
CHROME_REFRESH_TOKEN: ${{ secrets.CHROME_REFRESH_TOKEN }}
38+
- name: wxt submit edge
39+
if: "${{ github.event.inputs.to_publish == 'all' || github.event.inputs.to_publish == 'edge' }}"
40+
run: pnpm wxt submit --edge-zip .output/*-chrome.zip \
41+
env:
42+
EDGE_PRODUCT_ID: ${{ secrets.EDGE_PRODUCT_ID }}
43+
EDGE_CLIENT_ID: ${{ secrets.EDGE_CLIENT_ID }}
44+
EDGE_CLIENT_SECRET: ${{ secrets.EDGE_CLIENT_SECRET }}
45+
EDGE_ACCESS_TOKEN_URL: ${{ secrets.EDGE_ACCESS_TOKEN_URL }}

src/lib/config.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const MODES = ["PROD", "PLAYGROUNDS_PR"] as const
1+
const MODES = ["PROD"] as const
22

33
export type ModeType = (typeof MODES)[number]
44

@@ -8,6 +8,8 @@ export type LogLevel = (typeof LOG_LEVELS)[number]
88

99
export const CONFIG = {
1010
EXTENSION_NAME: "gitcasso", // decorates logs
11-
LOG_LEVEL: "DEBUG" satisfies LogLevel,
11+
LOG_LEVEL: (import.meta.env.MODE === "production"
12+
? "WARN"
13+
: "DEBUG") satisfies LogLevel,
1214
MODE: "PROD" satisfies ModeType,
1315
} as const

wxt.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default defineConfig({
1515
128: "/icons/icon-128.png",
1616
},
1717
name: "Gitcasso",
18-
permissions: ["activeTab", "tabs"],
18+
permissions: ["activeTab"],
1919
version: "0.2.0",
2020
},
2121
modules: ["@wxt-dev/webextension-polyfill"],

0 commit comments

Comments
 (0)