Skip to content

Publish Extensions

Publish Extensions #93

Workflow file for this run

name: Publish Extensions
on:
workflow_dispatch:
inputs:
dry-run:
description: 'dry run mode, will upload to the store but not publish and turn on verbose logging'
required: false
type: boolean
default: true
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
browser: [chrome, edge]
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 8
- name: Setup Node.js
uses: actions/[email protected]
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build And Package Extensions
run: pnpm build --zip --target=${{ matrix.browser }}-mv3
- name: Upload to GitHub Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.browser }}-mv3
path: build/
publish:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
path: build/
- name: Browser Platform Publish
uses: PlasmoHQ/[email protected]
with:
verbose: ${{ inputs.dry-run }}
keys: |
{
"$schema": "https://raw.githubusercontent.com/plasmo-corp/bpp/v3/keys.schema.json",
"chrome": {
"zip": "build/chrome-mv3/chrome-mv3-prod.zip",
"clientId": "${{ secrets.CHROME_CLIENT_ID }}",
"clientSecret": "${{ secrets.CHROME_CLIENT_SECRET }}",
"refreshToken": "${{ secrets.CHROME_REFRESH_TOKEN }}",
"extId": "nhomlepkjglilcahfcfnggebkaabeiog",
"uploadOnly": ${{ inputs.dry-run }}
},
"edge": {
"zip": "build/edge-mv3/edge-mv3-prod.zip",
"clientId": "${{ secrets.EDGE_CLIENT_ID }}",
"clientSecret": "${{ secrets.EDGE_CLIENT_SECRET}}",
"productId": "${{ secrets.EDGE_PRODUCT_ID }}",
"accessTokenUrl": "${{ secrets.EDGE_ACCESS_TOKEN_URL }}",
"uploadOnly": ${{ inputs.dry-run }},
"notes": "https://github.com/eric2788/bilibili-vup-stream-enhancer"
}
}