-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathupload-chrome-extension-draft.yml
More file actions
72 lines (57 loc) · 1.89 KB
/
upload-chrome-extension-draft.yml
File metadata and controls
72 lines (57 loc) · 1.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Upload Chrome Extension Draft
on:
push:
branches:
- main
permissions:
contents: write
jobs:
upload-draft:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "24"
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Update version
run: node scripts/updateVersion.js
- name: Build extension
env:
VITE_GA_API_SECRET: ${{ secrets.VITE_GA_API_SECRET }}
VITE_API_BASE_URL: ${{ secrets.VITE_API_BASE_URL }}
run: tsc -b && pnpm exec vite build --mode production
- name: Create extension zip
run: |
cd dist
zip -r ../extension.zip .
cd ..
- name: Install chrome-webstore-upload-cli
run: npm install -g chrome-webstore-upload-cli
- name: Upload to Chrome Web Store (Draft only)
run: |
chrome-webstore-upload upload \
--source extension.zip \
--extension-id ${{ secrets.CHROME_EXTENSION_ID }} \
--client-id ${{ secrets.CHROME_CLIENT_ID }} \
--client-secret ${{ secrets.CHROME_CLIENT_SECRET }} \
--refresh-token ${{ secrets.CHROME_REFRESH_TOKEN }}
- name: Commit and push version update
run: |
# Git 설정
git config --local user.email ${{ secrets.GIT_USER_EMAIL }}
git config --local user.name "Turtle-Hwan"
# 현재 버전 읽기
VERSION=$(node -p "require('./public/manifest.json').version")
# 변경사항 커밋 및 푸시
git add public/manifest.json
git commit -m "chore: bump version to ${VERSION} [skip ci]"
git push