Submit to Firefox Add-ons #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "Submit to Firefox Add-ons" | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| # Only run on production branch | |
| # if: github.ref == 'refs/heads/production' | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4.0.1 | |
| with: | |
| node-version: "20.x" | |
| cache: "yarn" | |
| - name: Cache yarn modules | |
| uses: actions/cache@v3 | |
| with: | |
| path: "**/node_modules" | |
| key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-yarn- | |
| - name: Install dependencies | |
| run: yarn install --frozen-lockfile | |
| - name: Create .env file | |
| run: | | |
| echo "PLASMO_PUBLIC_TRANSAK_API_KEY=${{ secrets.TRANSAK_API_KEY }}" >> .env | |
| echo "PLASMO_PUBLIC_TRANSAK_TOP_TIER_API_KEY=${{ secrets.TRANSAK_TOP_TIER_API_KEY }}" >> .env | |
| echo "PLASMO_PUBLIC_GA_MEASUREMENT_ID=${{ secrets.GA_MEASUREMENT_ID }}" >> .env | |
| echo "PLASMO_PUBLIC_GA_API_SECRET=${{ secrets.GA_API_SECRET }}" >> .env | |
| - name: Build the Firefox extension (includes bundle splitting) | |
| run: yarn build:firefox | |
| - name: Package into zip artifact | |
| run: cd build && zip -r firefox-mv3-prod.zip firefox-mv3-prod/ | |
| - name: Browser Platform Publish | |
| uses: PlasmoHQ/bpp@v3 | |
| with: | |
| keys: '{"firefox":{"extId":"${{ secrets.FIREFOX_EXT_ID }}","apiKey":"${{ secrets.FIREFOX_API_KEY }}","apiSecret":"${{ secrets.FIREFOX_API_SECRET }}"}}' | |
| artifact: build/firefox-mv3-prod.zip |