Skip to content

Commit

Permalink
ci: 增加github-action
Browse files Browse the repository at this point in the history
  • Loading branch information
eeelester committed Sep 14, 2024
1 parent 6c5d40f commit 7839e79
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 2 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Deploy

on: workflow_dispatch

jobs:
submit:
name: Release && Submit
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: pnpm/action-setup@v4
with:
version: "latest"

- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'

- name: git config
run: |
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: Install dependencies
run: pnpm install

- name: release
run: pnpm release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Zip extensions
run: pnpm zip

- name: List files
run: ls -R

- name: Submit to stores
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 }}
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
"lint": "eslint src/** --fix",
"test": "jest",
"prepare": "husky install",
"release": "release-it && wxt build",
"submit": "wxt submit --dry-run --chrome-zip .output/bilibili-fullscreen-sc-0.5.5-chrome.zip"
"release": "release-it"
},
"dependencies": {
"bilibili-live-ws": "^6.3.1",
Expand Down

0 comments on commit 7839e79

Please sign in to comment.