diff --git a/.github/actions/build/app/action.yml b/.github/actions/build/app/action.yml index c01486e9e9..a5b8901ec8 100644 --- a/.github/actions/build/app/action.yml +++ b/.github/actions/build/app/action.yml @@ -60,6 +60,10 @@ inputs: description: 'Project environment for Sentry, used to differentiate issue sources' required: false default: '' + BROWSER_TARGET: + description: 'Browser target to build for. Default is undefined, which will build for Chromium browsers. Other options are "firefox"' + required: false + default: 'chrome' runs: using: 'composite' @@ -89,9 +93,24 @@ runs: SENTRY_ORG: ${{ inputs.SENTRY_ORG }} SENTRY_PROJECT: ${{ inputs.SENTRY_PROJECT }} SENTRY_ENVIRONMENT: ${{ inputs.SENTRY_ENVIRONMENT }} + BROWSER: ${{ inputs.BROWSER_TARGET }} - name: Upload artifact + if: ${{ inputs.BROWSER_TARGET != 'firefox' }} uses: actions/upload-artifact@v4 with: name: ${{ inputs.NAME }} path: ${{ inputs.DIR }}/dist + + - name: Pack Firefox + if: ${{ inputs.BROWSER_TARGET == 'firefox' }} + run: yarn pack:firefox + shell: bash + working-directory: ${{ inputs.DIR }} + + - name: Upload Firefox artifact + if: ${{ inputs.BROWSER_TARGET == 'firefox' }} + uses: actions/upload-artifact@v4 + with: + name: ${{ inputs.NAME }} + path: ${{ inputs.DIR }}/artifacts-firefox diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f658ab13c2..f52fc102bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -210,6 +210,27 @@ jobs: SENTRY_PROJECT: ${{ startsWith(github.ref, 'refs/heads/release') && vars.SENTRY_PROJECT || ''}} SENTRY_ENVIRONMENT: 'production' DAPP_RADAR_API_KEY: ${{ startsWith(github.ref, 'refs/heads/release') && secrets.DAPP_RADAR_API_KEY || '' }} + + - name: Build Lace Firefox addon + uses: ./.github/actions/build/app + with: + BROWSER_TARGET: 'firefox' + BLOCKFROST_PROJECT_ID_MAINNET: ${{ secrets.BLOCKFROST_PROJECT_ID_MAINNET }} + BLOCKFROST_PROJECT_ID_PREPROD: ${{ secrets.BLOCKFROST_PROJECT_ID_PREPROD }} + BLOCKFROST_PROJECT_ID_PREVIEW: ${{ secrets.BLOCKFROST_PROJECT_ID_PREVIEW }} + DIR: apps/browser-extension-wallet + NAME: lace-firefox-addon + LACE_EXTENSION_KEY: ${{ secrets.MANIFEST_PUBLIC_KEY }} + POSTHOG_PRODUCTION_TOKEN: ${{ startsWith(github.ref, 'refs/heads/release') && secrets.POSTHOG_PRODUCTION_TOKEN || '' }} + PRODUCTION_MODE_TRACKING: ${{ startsWith(github.ref, 'refs/heads/release') && 'true' || 'false' }} + BANXA_LACE_URL: ${{ startsWith(github.ref, 'refs/heads/release') && 'https://lacewallet.banxa.com/' }} + SENTRY_AUTH_TOKEN: ${{ startsWith(github.ref, 'refs/heads/release') && secrets.SENTRY_AUTH_TOKEN || '' }} + SENTRY_DSN: ${{ secrets.SENTRY_DSN }} + SENTRY_ORG: ${{ startsWith(github.ref, 'refs/heads/release') && vars.SENTRY_ORG || '' }} + SENTRY_PROJECT: ${{ startsWith(github.ref, 'refs/heads/release') && vars.SENTRY_PROJECT || ''}} + SENTRY_ENVIRONMENT: 'production' + DAPP_RADAR_API_KEY: ${{ startsWith(github.ref, 'refs/heads/release') && secrets.DAPP_RADAR_API_KEY || '' }} + build: name: Build Lace runs-on: ubuntu-22.04