Skip to content

armgit / mimik

Public Imported from GitHub
0

🎬 A browser extension and desktop app that turns your clicks into step-by-step guides with annotated screenshots πŸ“–

ci: add test + store submission workflows

Luis Ortiz9a9005d31cfd
diff --git a/.github/workflows/pr-test.yml b/.github/workflows/pr-test.yml
new file mode 100644
index 0000000..12b3728
--- /dev/null
+++ b/.github/workflows/pr-test.yml
@@ -0,0 +1,41 @@
+name: PR Tests
+
+on:
+ pull_request:
+ branches:
+ - main
+ push:
+ branches:
+ - main
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ test:
+ name: Test & Build
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v6
+
+ - uses: pnpm/action-setup@v5
+
+ - uses: actions/setup-node@v6
+ with:
+ node-version: "22"
+ cache: pnpm
+
+ - run: pnpm install --frozen-lockfile
+
+ - name: Lint
+ run: pnpm lint
+
+ - name: Run tests
+ run: pnpm test
+
+ - name: Build Chrome
+ run: pnpm build
+
+ - name: Build Firefox
+ run: pnpm build:firefox
diff --git a/.github/workflows/submit.yml b/.github/workflows/submit.yml
new file mode 100644
index 0000000..83c8f9b
--- /dev/null
+++ b/.github/workflows/submit.yml
@@ -0,0 +1,79 @@
+name: Submit to Stores
+
+on:
+ workflow_dispatch:
+ inputs:
+ tag:
+ description: "Release tag to submit (e.g., v1.0.0)"
+ required: true
+ type: string
+ dryRun:
+ description: Dry run (build + zip but skip submission)
+ required: false
+ default: false
+ type: boolean
+ targets:
+ description: Which stores to submit to
+ required: true
+ default: chrome-firefox
+ type: choice
+ options:
+ - chrome-firefox
+ - chrome
+ - firefox
+
+jobs:
+ submit:
+ name: Submit to Stores
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout release tag
+ uses: actions/checkout@v6
+ with:
+ ref: ${{ inputs.tag }}
+
+ - uses: pnpm/action-setup@v5
+
+ - uses: actions/setup-node@v6
+ with:
+ node-version: "22"
+ cache: pnpm
+
+ - run: pnpm install --frozen-lockfile
+
+ - name: Run tests
+ run: pnpm test
+
+ - name: Build and zip
+ run: pnpm zip:all
+
+ - name: Upload zips to GitHub release
+ run: |
+ gh release upload "${{ inputs.tag }}" \
+ .output/*-chrome.zip \
+ .output/*-firefox.zip \
+ .output/*-sources.zip \
+ --clobber
+ env:
+ GH_TOKEN: ${{ github.token }}
+
+ - name: Submit to Chrome Web Store
+ if: inputs.targets != 'firefox' && !inputs.dryRun
+ run: |
+ pnpm wxt submit --chrome-zip .output/*-chrome.zip
+ env:
+ CHROME_EXTENSION_ID: ${{ secrets.CHROME_EXTENSION_ID }}
+ CHROME_CLIENT_ID: ${{ secrets.CHROME_CLIENT_ID }}
+ CHROME_CLIENT_SECRET: ${{ secrets.CHROME_CLIENT_SECRET }}
+ CHROME_REFRESH_TOKEN: ${{ secrets.CHROME_REFRESH_TOKEN }}
+
+ - name: Submit to Firefox AMO
+ if: inputs.targets != 'chrome' && !inputs.dryRun
+ run: |
+ pnpm wxt submit \
+ --firefox-zip .output/*-firefox.zip \
+ --firefox-sources-zip .output/*-sources.zip
+ env:
+ FIREFOX_EXTENSION_ID: ${{ secrets.FIREFOX_EXTENSION_ID }}
+ FIREFOX_JWT_ISSUER: ${{ secrets.FIREFOX_JWT_ISSUER }}
+ FIREFOX_JWT_SECRET: ${{ secrets.FIREFOX_JWT_SECRET }}