Skip to content

Minor: Manual deploy #223

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

Closed
wants to merge 5 commits into from
Closed
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
40 changes: 40 additions & 0 deletions .github/workflows/publish-chrome.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Publish to Chrome Web Store

on:
workflow_dispatch: # This allows the workflow to be triggered manually

jobs:
publish:
name: Publish Extension
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: 'master'

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"

- name: Install dependencies
run: npm install
Comment on lines +22 to +23
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (performance): Check if installing dependencies is necessary for the packaging and upload steps.

If dependencies aren't needed for packaging or upload, you can skip 'npm install' to improve workflow speed. If a build step is needed, make it explicit.

Suggested implementation:

      - name: Create ZIP file
        run: |
          cd src
          zip -r ../extension.zip . -x "*.DS_Store" 
        # This command zips the contents of src directory

If you actually need to build the extension (e.g., with a step like npm run build), add that step explicitly before the Create ZIP file step, and only then would you need to install dependencies. Otherwise, this change will speed up your workflow by skipping unnecessary dependency installation.


- name: Build the extension
run: npm run build

- name: Create ZIP file
run: |
cd dist
zip -r ../extension.zip . -x "*.DS_Store"

- name: Upload to Chrome Web Store
uses: w3c/chrome-webstore-upload-action@v1
with:
extension-id: ${{ secrets.CHROME_EXTENSION_ID }}
client-id: ${{ secrets.CHROME_CLIENT_ID }}
client-secret: ${{ secrets.CHROME_CLIENT_SECRET }}
refresh-token: ${{ secrets.CHROME_REFRESH_TOKEN }}
zip-file: extension.zip
Loading