diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5692a4f..dde9de4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,9 +2,9 @@ name: Build Extension on: push: - branches: [ main ] + branches: [main] pull_request: - branches: [ main ] + branches: [main] workflow_dispatch: jobs: @@ -12,31 +12,40 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - - name: Setup Bun - uses: oven-sh/setup-bun@v1 - with: - bun-version: latest - - - name: Install dependencies - run: bun install - - - name: Build extensions - run: | - bun run build - bun run build:firefox - - - name: Upload Chrome artifact - uses: actions/upload-artifact@v4 - with: - name: chrome-extension - path: .output/chrome-mv3 - if-no-files-found: error - - - name: Upload Firefox artifact - uses: actions/upload-artifact@v4 - with: - name: firefox-extension - path: .output/firefox-mv2 - if-no-files-found: error \ No newline at end of file + - uses: actions/checkout@v4 + + - name: Setup Bun + uses: oven-sh/setup-bun@v1 + with: + bun-version: latest + + - name: Install dependencies + run: bun install + + - name: Build extensions + run: | + bun run zip + bun run zip:firefox + + - name: Upload Chrome artifact + uses: actions/upload-artifact@v4 + with: + name: chrome-extension + path: .output/chrome-mv3 + if-no-files-found: error + + - name: Upload Firefox artifact + uses: actions/upload-artifact@v4 + with: + name: firefox-extension + path: .output/firefox-mv2 + if-no-files-found: error + + - name: Upload to AMO + uses: trmcnvn/firefox-addon@v1 + with: + uuid: ${{ secrets.FIREFOX_UUID }} + xpi: .output/figma-wakatime-firefox.zip + manifest: manifest.json + api-key: ${{ secrets.FIREFOX_API_KEY }} + api-secret: ${{ secrets.FIREFOX_API_SECRET }} diff --git a/wxt.config.ts b/wxt.config.ts index e0ac654..470dc51 100644 --- a/wxt.config.ts +++ b/wxt.config.ts @@ -4,6 +4,9 @@ import { defineConfig } from "wxt"; export default defineConfig({ srcDir: "src", modules: ["@wxt-dev/auto-icons", "@wxt-dev/module-svelte"], + zip: { + artifactTemplate: "{{name}}-{{browser}}.zip", + }, manifest: { name: "WakaTime for Figma", description: