Skip to content

Commit 37beee5

Browse files
committed
ci: add extension signing
1 parent 7db3c36 commit 37beee5

3 files changed

Lines changed: 32 additions & 8 deletions

File tree

.github/workflows/release.yml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ jobs:
1515
- name: Checkout code
1616
uses: actions/checkout@v6
1717

18+
- name: Setup Node.js
19+
uses: actions/setup-node@v6
20+
with:
21+
node-version: "24"
22+
23+
- name: Install dependencies
24+
run: npm ci
25+
1826
- name: Extract version from tag
1927
id: version
2028
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
@@ -32,6 +40,21 @@ jobs:
3240
chmod +x build-extension.sh
3341
./build-extension.sh
3442
43+
- name: Sign Firefox XPI
44+
env:
45+
WEB_EXT_API_KEY: ${{ secrets.WEB_EXT_API_KEY }}
46+
WEB_EXT_API_SECRET: ${{ secrets.WEB_EXT_API_SECRET }}
47+
run: |
48+
npx web-ext sign \
49+
--source-dir=comping \
50+
--channel=unlisted \
51+
--artifacts-dir=build/signed
52+
53+
# Replace unsigned XPI with signed version
54+
SIGNED_XPI=$(ls build/signed/*.xpi)
55+
mv "$SIGNED_XPI" "build/comping-${{ steps.version.outputs.VERSION }}.xpi"
56+
rm -rf build/signed
57+
3558
- name: Create Release and Upload Assets
3659
uses: softprops/action-gh-release@v2
3760
with:
@@ -42,8 +65,9 @@ jobs:
4265
### Installation
4366
4467
**Firefox:**
45-
- Download `comping-${{ steps.version.outputs.VERSION }}.xpi`
46-
- Navigate to `about:addons`, click the gear icon and select "Install Add-on From File..."
68+
- Download `comping-${{ steps.version.outputs.VERSION }}.xpi` (signed by Mozilla)
69+
- Open the downloaded file with Firefox, or drag and drop it onto Firefox
70+
- Click "Add" when prompted
4771
4872
**Chrome:**
4973
- Download `comping-${{ steps.version.outputs.VERSION }}-chrome.zip`

comping/manifest.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
{
22
"manifest_version": 2,
33
"name": "Comping",
4-
"version": "0.1.3",
4+
"version": "0.1.4",
55
"description": "An add-on to accompany your browsing by adding notes on works cached from Sonemic websites (music, movies, video games).",
66
"browser_specific_settings": {
77
"gecko": {
8-
"id": "comping@dbeley.ovh",
9-
"strict_min_version": "91.0"
8+
"id": "comping@dbeley.ovh"
109
}
1110
},
1211
"permissions": [

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212
"build": "./build-extension.sh"
1313
},
1414
"devDependencies": {
15-
"eslint": "^9.15.0",
16-
"globals": "^15.12.0",
17-
"prettier": "^3.3.3"
15+
"eslint": "^9.39.2",
16+
"globals": "^16.5.0",
17+
"prettier": "^3.7.4",
18+
"web-ext": "^9.2.0"
1819
}
1920
}

0 commit comments

Comments
 (0)