Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update release workflow to publish to chrome & firefox #10

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions .github/.workflow/release.yaml

This file was deleted.

57 changes: 57 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Build & Publish

on:
release:
types: [published]

jobs:
build:
name: Build web extension
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: yarn
- run: yarn install
- run: echo "VITE_INLINE_RUNTIME_CHUNK=false" > .env
- run: yarn build
- name: archive source code
run: |
git archive --output source.zip HEAD -- ":!.github"
unzip -l source.zip
- uses: actions/upload-artifact@v4
with:
name: build
path: build
- uses: actions/upload-artifact@v4
with:
name: source
path: source.zip

firefox:
name: Submit (Firefox)
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
- name: sign and submit extension
run: web-ext sign --source-dir build --channel listed --upload-source-code source/source.zip
env:
WEB_EXT_API_KEY: ${{ secrets.WEB_EXT_API_KEY }}
WEB_EXT_API_SECRET: ${{ secrets.WEB_EXT_API_SECRET }}

chrome:
name: Submit (Chrome)
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
- run: npx chrome-webstore-upload-cli
working-directory: build
env:
EXTENSION_ID: ${{ secrets.EXTENSION_ID }}
CLIENT_ID: ${{ secrets.CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }}
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lts-iron
lts/iron