-
-
Notifications
You must be signed in to change notification settings - Fork 12
42 lines (36 loc) · 1.41 KB
/
publish-to-amo-on-ff-bump.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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