diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..3b8a79b --- /dev/null +++ b/.github/workflows/ci.yml @@ -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 }} diff --git a/package.json b/package.json index 91d56a7..d863059 100644 --- a/package.json +++ b/package.json @@ -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",