Skip to content

Publish to Firefox (Prod) #99

Publish to Firefox (Prod)

Publish to Firefox (Prod) #99

name: Publish to Firefox (Prod)
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
token: ${{ secrets.ORG_ACCESS_TOKEN }}
- uses: actions/setup-node@v4
with:
node-version: "22.17.0"
- name: Enable Corepack
run: corepack enable
- name: Install deps via Yarn
run: |
yarn install --immutable
yarn setup
- uses: actions/checkout@v4
with:
repository: 'rainbow-me/browser-extension-env'
token: ${{ secrets.ORG_ACCESS_TOKEN }}
path: tmp
- name: Copy dotenv
run: cat tmp/dotenv >> .env && rm -rf tmp
- name: Fetch the current version number
run: echo "release_version=$(cat package.json | jq -r .version)" >> $GITHUB_ENV
- name: Build the extension ready for the Firefox Add Ons Store
run: yarn firefox:build
- name: Update the manifest
run: yarn update-manifest prod
- name: Zip source
run: yarn zip:source
- name: Archive the source artifact
uses: actions/upload-artifact@v4
with:
name: rainbowbx-firefox-v${{ env.release_version }}-source
path: ./rainbowbx-source.zip
- name: Zip build
run: yarn firefox:zip
- name: Archive the build artifact
uses: actions/upload-artifact@v4
with:
name: rainbowbx-firefox-v${{ env.release_version }}
path: build/
- name: Submit to the firefox addons store
uses: PlasmoHQ/bpp@v3.8.0
with:
file: ./rainbowbx.xpi
source: ./rainbowbx-source.zip
keys: ${{ secrets.BPP_KEYS_PROD_FIREFOX }}
- name: Create Sentry release
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
with:
environment: production
finalize: true
sourcemaps: ./build
version: ${{ env.release_version }}
url_prefix: 'chrome-extension://opfgelmcmbiajamepnmloijbpoleiama'