Add publish-firefox-extension to CI workflow #7
Workflow file for this run
This file contains 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: 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 | |
env: | |
WEB_EXT_API_SECRET: ${{ secrets.FIREFOX_API_SECRET }} | |
run: | | |
npx web-ext sign --source-dir=./dist/firefox --api-key="${{ vars.FIREFOX_API_KEY }}" | |
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 }} |