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

Conversation

vedansh-5
Copy link
Contributor

@vedansh-5 vedansh-5 commented Jul 31, 2025

📌 Fixes

Fixes #85

✅ Checklist

  • I’ve tested my changes locally
  • I’ve added tests (if applicable)
  • I’ve updated documentation (if applicable)
  • My code follows the project’s code style guidelines

👀 Reviewer Notes

Add any special notes for the reviewer here

Summary by Sourcery

Add a GitHub Actions workflow to enable manual deployment of the Chrome extension by packaging the source and uploading it to the Chrome Web Store using action secrets.

Bug Fixes:

Enhancements:

  • Add a GitHub Actions workflow to manually publish the Chrome extension to the Web Store

CI:

  • Introduce a 'publish-chrome' workflow that triggers on workflow_dispatch and handles build, packaging, and upload steps

Deployment:

  • Configure ZIP creation of the src folder and upload to Chrome Web Store using stored secrets

Signed-off-by: Vedansh Saini <77830698+vedansh-5@users.noreply.github.com>
Signed-off-by: Vedansh Saini <77830698+vedansh-5@users.noreply.github.com>
Signed-off-by: Vedansh Saini <77830698+vedansh-5@users.noreply.github.com>
Copy link
Contributor

sourcery-ai bot commented Jul 31, 2025

Reviewer's Guide

This PR introduces a new GitHub Actions workflow that enables manual deployment of the Chrome extension to the Chrome Web Store. It sets up Node.js, installs dependencies, packages the extension, and uses the official upload action with credentials stored in secrets.

Flow diagram for manual deployment process via GitHub Actions

flowchart TD
  A[Manual trigger via workflow_dispatch] --> B[Checkout repository]
  B --> C[Set up Node.js]
  C --> D[Install dependencies]
  D --> E[Create ZIP file from src/]
  E --> F[Upload ZIP to Chrome Web Store]
Loading

File-Level Changes

Change Details Files
Add manual-deploy workflow for Chrome Web Store
  • Define a new workflow triggered by workflow_dispatch
  • Checkout the repository using actions/checkout@v4
  • Set up Node.js v20 via actions/setup-node@v4
  • Install project dependencies with npm install
  • Package the src directory into extension.zip, excluding .DS_Store files
  • Upload the ZIP to the Chrome Web Store using w3c/chrome-webstore-upload-action@v1 with secrets
.github/workflows/publish-chrome.yml

Assessment against linked issues

Issue Objective Addressed Explanation
#85 Deploy project automatically to Chrome Web Store using Github Actions. The workflow added in the PR is configured to run only on manual trigger (workflow_dispatch), not automatically (e.g., on push or release). Therefore, it does not implement automatic deployment as requested in the issue.

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@vedansh-5 vedansh-5 self-assigned this Jul 31, 2025
@vedansh-5 vedansh-5 requested review from hpdang and Preeti9764 July 31, 2025 20:48
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @vedansh-5 - I've reviewed your changes - here's some feedback:

  • Consider adding a build step (e.g., npm run build) before zipping to ensure your extension’s compiled assets are included.
  • You can speed up manual deployments by caching your npm dependencies with actions/cache in the workflow.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider adding a build step (e.g., npm run build) before zipping to ensure your extension’s compiled assets are included.
- You can speed up manual deployments by caching your npm dependencies with actions/cache in the workflow.

## Individual Comments

### Comment 1
<location> `.github/workflows/publish-chrome.yml:20` </location>
<code_context>
+        with:
+          node-version: "20"
+
+      - name: Install dependencies
+        run: npm install
+
+      - name: Create ZIP file
</code_context>

<issue_to_address>
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.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment on lines +20 to +21
- name: Install dependencies
run: npm install
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.

Signed-off-by: Vedansh Saini <77830698+vedansh-5@users.noreply.github.com>
Signed-off-by: Vedansh Saini <77830698+vedansh-5@users.noreply.github.com>
@vedansh-5 vedansh-5 changed the title Manual deploy Minor Manual deploy Aug 4, 2025
@vedansh-5 vedansh-5 changed the title Minor Manual deploy Minor: Manual deploy Aug 4, 2025
@vedansh-5 vedansh-5 closed this Aug 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deploy project automatically to Chrome Web Store
1 participant