Skip to content

Commit

Permalink
Merge pull request #1 from Gaohaoyang/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Gaohaoyang authored Aug 23, 2024
2 parents 9c9c199 + c21ca3f commit dec5b8f
Show file tree
Hide file tree
Showing 4 changed files with 236 additions and 107 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: npm build and publish

# 执行脚本的生命周期
on:
#选择在 push 到 github 时触发工作流
push:
#分支可以选择多个
branches: [main]

# 一个 workflow 可以有多个 job
jobs:
build:
permissions:
id-token: write
contents: write
# 指定操作系统为'ubuntu-latest'
runs-on: ubuntu-latest
steps:
- name: Setup repo
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Version Check
id: check
uses: EndBug/version-check@v2
with:
diff-search: true

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: latest
if: steps.check.outputs.changed == 'true'

- name: Node env setup
uses: actions/setup-node@v4
if: steps.check.outputs.changed == 'true'
with:
node-version: lts/*
cache: pnpm
registry-url: 'https://registry.npmjs.org'

- run: pnpm i
if: steps.check.outputs.changed == 'true'

- run: pnpm run build
if: steps.check.outputs.changed == 'true'

- name: zip
if: steps.check.outputs.changed == 'true'
uses: montudor/action-zip@v1
with:
args: zip -qq -r dist.zip dist

- name: Upload & release
if: steps.check.outputs.changed == 'true'
uses: mnao305/chrome-extension-upload@v5.0.0
with:
file-path: dist.zip
extension-id: hibclclepijigjnfdkmkfhjogfhgicda
client-id: ${{ secrets.CLIENT_ID }}
client-secret: ${{ secrets.CLIENT_SECRET }}
refresh-token: ${{ secrets.REFRESH_TOKEN }}
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "pte-crx",
"private": true,
"version": "1.0.0",
"version": "1.1.0",
"type": "module",
"scripts": {
"dev": "vite",
Expand All @@ -12,7 +12,8 @@
"dependencies": {
"clsx": "^2.1.1",
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react-dom": "^18.3.1",
"react-draggable": "^4.4.6"
},
"devDependencies": {
"@crxjs/vite-plugin": "2.0.0-beta.25",
Expand Down
36 changes: 36 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit dec5b8f

Please sign in to comment.