Skip to content

Publish

Publish #5

Workflow file for this run

name: Publish
on:
workflow_dispatch:
jobs:
build-chrome:
name: Build Chrome extension
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Setup Bun environment
uses: oven-sh/setup-bun@v1
with:
bun-version: 0.7.0
- name: Install dependencies
run: bun install
- name: Build Chrome
run: bun run build
- name: Zip Chrome extension
run: |
cd dist
zip -r ../chrome_extension.zip .
- name: Upload Chrome extension artifacts
uses: actions/upload-artifact@v4
with:
name: better-studres-chrome
path: chrome_extension.zip
- name: Install webstore cli
run: |-
bun add -g chrome-webstore-upload-cli
- name: Upload step
run: |-
chrome-webstore-upload upload \
--source chrome-extension.zip \
--extension-id kamnhbpjhhhjlbandgpngdnplledombg \
--client-id ${{ secrets.GOOGLE_CLIENT_ID }} \
--client-secret ${{ secrets.GOOGLE_CLIENT_SECRET }} \
--refresh-token ${{ secrets.GOOGLE_REFRESH_TOKEN }}
build-firefox:
name: Build Firefox extension
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Setup Bun environment
uses: oven-sh/setup-bun@v1
with:
bun-version: 0.7.0
- name: Install dependencies
run: bun install
- name: Build Firefox
run: bun run build:firefox
- name: Upload Firefox extension artifacts
uses: actions/upload-artifact@v4
with:
name: better-studres-firefox
path: dist/