Skip to content

Conversation

@MLKendall
Copy link
Contributor

@MLKendall MLKendall commented Oct 14, 2025

Added GitHub Actions workflow that automatically builds extension packages on every push to main and pull requests. The workflow installs dependencies, runs the build script, validates Firefox compatibility (ensuring proper manifest conversion from Chrome Manifest V3 to Firefox format), and uploads both Chrome and Firefox .zip files as build artifacts.

To Validate:

  • Verify that all checks have passed on this PR.
  • Verify that a comment has been auto generated that includes a download link to the built artifacts
  • Download the Chrome, Firefox, and Build files. Verify that they can be loaded into Chrome/Firefox respectively. (see the repo README) for instructions.

@github-actions
Copy link

github-actions bot commented Oct 14, 2025

📦 Extension packages built successfully!

Download your Chrome and Firefox extension packages

@MLKendall MLKendall force-pushed the bldl-23--automate-browser-extension-packaging branch 2 times, most recently from 1e6a02c to a607dd6 Compare October 14, 2025 18:52
@MLKendall MLKendall force-pushed the bldl-23--automate-browser-extension-packaging branch from a607dd6 to 9a8637a Compare October 14, 2025 19:01
Comment on lines 19 to 20
# Continue on error to ensure we always get some output
continue-on-error: false
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't need to set this if we're not continuing on error.

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "18"
Copy link
Contributor

Choose a reason for hiding this comment

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

LTS is 22, let's use that.

Comment on lines 38 to 39
- name: Validate Firefox modifications
run: node -e "const m=JSON.parse(require('fs').readFileSync('build/firefox/manifest.json','utf8')); if(!m.background.scripts||!m.browser_specific_settings?.gecko||m.background.service_worker) {console.error('❌ Firefox manifest missing required modifications or still has service_worker'); process.exit(1);} console.log('✅ Firefox manifest properly modified')"
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems incredibly brittle to me, better to write tests or do this error checking in the build script than to do this check on every build.

Comment on lines 55 to 60
- name: Upload build directory artifact
uses: actions/upload-artifact@v4
with:
name: build-directory
path: build/
retention-days: 30
Copy link
Contributor

Choose a reason for hiding this comment

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

We can most likely do without saving the entire build directory. The two zip files for Chrome/Firefox should be sufficient.

@dustin-jw dustin-jw merged commit a152391 into main Oct 21, 2025
1 check passed
@dustin-jw dustin-jw deleted the bldl-23--automate-browser-extension-packaging branch October 21, 2025 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants