Update the Mozilla Firefox Update JSON File after a Release for Self Hosted Extensions.
| Input | Default | Short Description of the Input Value |
|---|---|---|
| url | Required | Update URL with {version} in the string. |
| update | update.json |
Update JSON File Location |
| manifest | manifest.json |
* Manifest File Location |
| version | - | * Override Version from manifest |
| addon_id | - | * Override Addon ID from manifest |
manifest - If provided the version and addon_id will be parsed from this file.
version - Manually specify the version to use for {version} in url.
addon_id - Manually specify the addon_id to use for update JSON file.
If not provided this is parsed from the manfiest key: browser_specific_settings.gecko.id
- name: 'Mozilla Addon Update'
uses: cssnr/mozilla-addon-update-action@v1
with:
url: 'https://github.com/cssnr/link-extractor/releases/download/{version}/link_extractor-firefox.xpi'| Output | Description |
|---|---|
| url | Update URL Result |
| result | Update JSON Result |
- name: 'Mozilla Addon Update'
id: update
uses: cssnr/mozilla-addon-update-action@v1
with:
url: 'https://github.com/cssnr/link-extractor/releases/download/{version}/link_extractor-firefox.xpi'
- name: 'Echo Outputs'
run: |
echo '${{ steps.update.outputs.url }}'
echo '${{ steps.update.outputs.result }}'This action expects the input_update JSON file to exist, be valid JSON and have a matching addon_id entry.
At a minimum, add a file similar to this where link-extractor@cssnr.com is your Addon ID:
{
"addons": {
"link-extractor@cssnr.com": {
"updates": []
}
}
}For more details see: src/main.py.
Mozilla Documentation: https://extensionworkshop.com/documentation/manage/updating-your-extension/
Basic Example with All Inputs:
- name: 'Mozilla Addon Update'
uses: cssnr/mozilla-addon-update-action@v1
with:
url: 'https://github.com/cssnr/link-extractor/releases/download/{version}/link_extractor-firefox.xpi'
update: update.json
manifest: manifest.json
version: '1.0.0'
addon_id: link-extractor@cssnr.comSimple Example:
name: 'Mozilla Addon Update'
on:
workflow_dispatch:
release:
types: [published]
jobs:
mozilla-update:
name: 'Mozilla Addon Update'
runs-on: ubuntu-latest
timeout-minutes: 5
if: ${{ github.event_name == 'release' }}
steps:
- name: 'Checkout'
uses: actions/checkout@v4
- name: 'Mozilla Addon Update'
uses: cssnr/mozilla-addon-update-action@v1
with:
url: 'https://github.com/cssnr/link-extractor/releases/download/{version}/link_extractor-firefox.xpi'Full Example:
name: 'Mozilla Addon Update'
on:
workflow_dispatch:
release:
types: [published]
jobs:
build:
name: 'Build'
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: 'Checkout'
uses: actions/checkout@v4
- name: 'Build All'
run: |-
npm install
npm run build
- name: 'Upload to Release'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: web-ext-artifacts/*
tag: ${{ github.ref }}
overwrite: true
file_glob: true
mozilla-update:
name: 'Mozilla Addon Update'
runs-on: ubuntu-latest
timeout-minutes: 5
needs: [build]
if: ${{ github.event_name == 'release' }}
steps:
- name: 'Checkout'
uses: actions/checkout@v4
- name: 'Mozilla Addon Update'
uses: cssnr/mozilla-addon-update-action@v1
with:
url: 'https://github.com/cssnr/link-extractor/releases/download/{version}/link_extractor-firefox.xpi'
- name: 'Commit files'
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -a -m "Update update.json"
- name: 'Push changes'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: masterTo see this used in a build/publish/update workflow, check out:
https://github.com/cssnr/aviation-tools/blob/master/.github/workflows/build.yaml
For general help or to request a feature see:
- Q&A Discussion: https://github.com/cssnr/mozilla-addon-update-action/discussions/categories/q-a
- Request a Feature: https://github.com/cssnr/mozilla-addon-update-action/discussions/categories/feature-requests
If you are experiencing an issue/bug or getting unexpected results you can:
- Report an Issue: https://github.com/cssnr/mozilla-addon-update-action/issues
- Chat with us on Discord: https://discord.gg/wXy6m2X8wY
- Provide General Feedback: https://cssnr.github.io/feedback/
For more information, see the CSSNR SUPPORT.md.
Please consider making a donation to support the development of this project and additional open source projects.
If you would like to submit a PR, please review the CONTRIBUTING.md.
Additionally, you can support other GitHub Actions I have published:
- Stack Deploy Action
- Portainer Stack Deploy Action
- Docker Context Action
- VirusTotal Action
- Mirror Repository Action
- Update Version Tags Action
- Docker Tags Action
- Update JSON Value Action
- JSON Key Value Check Action
- Parse Issue Form Action
- Cloudflare Purge Cache Action
- Mozilla Addon Update Action
- Package Changelog Action
- NPM Outdated Check Action
- Label Creator Action
- Algolia Crawler Action
- Upload Release Action
- Check Build Action
- Web Request Action
- Get Commit Action
❔ Unpublished Actions
These actions are not published on the Marketplace, but may be useful.
- cssnr/draft-release-action - Keep a draft release ready to publish.
- cssnr/env-json-action - Convert env file to json or vice versa.
- cssnr/push-artifacts-action - Sync files to a remote host with rsync.
- smashedr/update-release-notes-action - Update release notes.
- smashedr/combine-release-notes-action - Combine release notes.
📝 Template Actions
These are basic action templates that I use for creating new actions.
- js-test-action - JavaScript
- py-test-action - Python
- ts-test-action - TypeScript
- docker-test-action - Docker Image
Note: The docker-test-action builds, runs and pushes images to GitHub Container Registry.
For a full list of current projects visit: https://cssnr.github.io/