feat: enable webextension builds

Currently only supports Chrome due to no `chrome` -> `browser` polyfill
This commit is contained in:
xenticore
2025-05-01 15:27:14 -04:00
parent d02bd7ac9d
commit 95ce637892
15 changed files with 281 additions and 53 deletions

View File

@@ -30,6 +30,5 @@ jobs:
- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: tf2wikipricing.user.js
path: |
dist/userscript/tf2wikipricing.user.js
name: tf2wikipricing
path: dist/

View File

@@ -26,9 +26,8 @@ jobs:
- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: tf2wikipricing.user.js
path: |
dist/userscript/tf2wikipricing.user.js
name: tf2wikipricing
path: dist/
deploy:
runs-on: debian-latest
needs: build
@@ -36,8 +35,14 @@ jobs:
- name: Download release artifacts
uses: actions/download-artifact@v3
with:
name: tf2wikipricing.user.js
path: userscript
name: tf2wikipricing
path: dist/
- name: Package Chrome extension
run: |
cd dist/
echo "${{ secrets.CRX_PRIVATE_KEY }}" > private.pem
bun x crx pack -p private.pem -o tf2wikipricing.crx extension/
rm -f private.pem
- name: Create release
id: use-go-action
uses: akkuman/gitea-release-action@v1
@@ -45,5 +50,6 @@ jobs:
title: "v${{ need.build.outputs.version }}"
name: "v${{ need.build.outputs.version }}"
files: |
userscript/**
dist/tf2wikipricing.crx
dist/tf2wikipricing.user.js
sha256sum: true