Bumped version
to 2024.12.23
↞ [auto-sync from https://github.com…
#49
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 to AMO on FF version bump | |
on: | |
push: | |
branches: [main] | |
paths: [firefox/extension/manifest.json] | |
jobs: | |
check-version-to-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout adamlui/chatgpt-widescreen | |
uses: actions/checkout@v4 | |
with: | |
sparse-checkout: firefox | |
fetch-depth: 2 | |
- name: Check FF manifest for version bump | |
run: | | |
current_ver=$(cat firefox/extension/manifest.json | grep '"version"' | sed -E 's/.*"version": "(.*)".*/\1/') | |
prev_ver=$(git show HEAD^:firefox/extension/manifest.json | grep '"version"' | sed -E 's/.*"version": "(.*)".*/\1/') | |
if [ "$current_ver" != "$prev_ver" ] ; then | |
echo "Extension updated from $prev_ver to $current_ver" | |
echo "VERSION_CHANGED=true" >> $GITHUB_ENV | |
else echo "VERSION_CHANGED=false" >> $GITHUB_ENV ; fi | |
- name: Create zipball | |
if: env.VERSION_CHANGED == 'true' | |
run: | | |
cd firefox/extension | |
zip -r ../../extension.zip . | |
- name: Publish to AMO | |
if: env.VERSION_CHANGED == 'true' | |
uses: cardinalby/webext-buildtools-firefox-addons-action@v1 | |
with: | |
extensionId: '[email protected]' | |
jwtIssuer: ${{ secrets.AMO_ISSUER }} | |
jwtSecret: ${{ secrets.AMO_SECRET }} | |
zipFilePath: extension.zip | |
continue-on-error: true |