Skip to content

Add publish-firefox-extension to CI workflow #8

Add publish-firefox-extension to CI workflow

Add publish-firefox-extension to CI workflow #8

Workflow file for this run

name: Publish Firefox Test
on:
pull_request:
workflow_dispatch:
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
# - name: Download zip archive
# uses: actions/download-artifact@v4
# with:
# name: firefox.zip
- name: Sign
id: sign
run: |
npx web-ext sign --source-dir=./dist/firefox --api-key="${{ vars.FIREFOX_API_KEY }}" --api-secret="${{ secrets.FIREFOX_API_SECRET }}"
echo "xpi_filepath=$(ls web-ext-artifacts/*.xpi)" >> "$GITHUB_OUTPUT"
- name: Publish
uses: trmcnvn/firefox-addon@v1
with:
# uuid is only necessary when updating an existing addon,
# omitting it will create a new addon
uuid: TBD
xpi: ${{ steps.sign.outputs.xpi_filepath }}
manifest: dist/firefox/manifest.json
api-key: ${{ vars.FIREFOX_API_KEY }}
api-secret: ${{ secrets.FIREFOX_API_SECRET }}