Skip to content

Commit

Permalink
Add autodeploy
Browse files Browse the repository at this point in the history
  • Loading branch information
SkyfallWasTaken committed Dec 21, 2024
1 parent 9ab10ea commit 8dae511
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 30 deletions.
69 changes: 39 additions & 30 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,50 @@ name: Build Extension

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]
workflow_dispatch:

jobs:
build:
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
- 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 }}
3 changes: 3 additions & 0 deletions wxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 8dae511

Please sign in to comment.