Skip to content

feat: update README

feat: update README #5

name: "Build Chrome Extension"
permissions: {}
on:
push:
branches: [ "main" ]
paths:
- packages/chrome-ext/**
- .github/workflows/build-chrome-ext.yml
defaults:
run:
working-directory: ./packages/chrome-ext
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: oven-sh/setup-bun@v1
- name: Install dependencies
run: bun install
- name: Build the extension
run: bun run build --zip && bun run build --target=edge-mv3 --zip && rm -rf build/chrome-mv3-prod build/edge-mv3-prod
- name: get-npm-version
id: package-version
uses: martinbeentjes/[email protected]
with:
path: packages/chrome-ext
- name: R2 Upload Action
uses: ryand56/r2-upload-action@latest
with:
r2-account-id: ${{ secrets.R2_ACCOUNT_ID }}
r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }}
r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }}
r2-bucket: ${{ secrets.R2_BUCKET }}
source-dir: packages/chrome-ext/build
destination-dir: ./${{ steps.package-version.outputs.current-version}}/
- name: Create version file
run: echo "${{ steps.package-version.outputs.current-version }}" > build/version.txt
- name: R2 Upload Action
uses: ryand56/r2-upload-action@latest
with:
r2-account-id: ${{ secrets.R2_ACCOUNT_ID }}
r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }}
r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }}
r2-bucket: ${{ secrets.R2_BUCKET }}
source-dir: packages/chrome-ext/build
destination-dir: ./
# - name: Browser Platform Publish
# uses: PlasmoHQ/bpp@v3
# with:
# keys: ${{ secrets.SUBMIT_KEYS }}
# artifact: build/chrome-mv3-prod.zip