Skip to content

Ci publish firefox

Ci publish firefox #7

Workflow file for this run

name: Publish Firefox Addon
on:
pull_request: # TEMPORARY
workflow_dispatch: # TEMPORARY
push:
tags:
- '*'
jobs:
publish-firefox-extension:
runs-on: ubuntu-latest
outputs:
xpi_filepath: ${{ steps.sign.outputs.xpi_filepath }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Install npm modules
run: npm ci
- name: Build
run: |
npm run build-firefox
npx web-ext build -s dist/firefox
- name: Sign
id: sign
env:
WEB_EXT_API_KEY: ${{ vars.FIREFOX_API_KEY }}
WEB_EXT_API_SECRET: ${{ secrets.FIREFOX_API_SECRET }}
run: |
npx web-ext sign --source-dir=./dist/firefox
echo "xpi_filepath=$(ls web-ext-artifacts/*.xpi)" >> "$GITHUB_OUTPUT"
- name: Publish
env:
WEB_EXT_API_KEY: ${{ vars.FIREFOX_API_KEY }}
WEB_EXT_API_SECRET: ${{ secrets.FIREFOX_API_SECRET }}
run: npm run publish-firefox-addon