Merge pull request 'fix(ext-ci): match AMO-renamed signed XPI' (#14) from dev into main

This commit was merged in pull request #14.
This commit is contained in:
2026-05-25 18:22:50 -04:00
+16 -4
View File
@@ -39,14 +39,26 @@ jobs:
- name: Commit signed XPI to frontend/public/extension/
run: |
set -e
XPI=$(ls extension/web-ext-artifacts/fabledcurator-*.xpi | head -1)
# AMO renames signed XPIs using its internal addon-id-safe-string
# (e.g. 997017ca3e104e30a75a-1.0.1.xpi), NOT our gecko ID. The
# original 'fabledcurator-*' glob never matched and the step
# exited 1 even on a successful sign (operator-flagged
# 2026-05-25). Match any *.xpi in the artifacts dir — fresh
# CI runner means there's exactly one — and rename it on copy
# so the FC server's whitelist (backend/app/frontend.py expects
# 'fabledcurator-*.xpi') keeps working.
XPI=$(ls extension/web-ext-artifacts/*.xpi 2>/dev/null | head -1)
if [ -z "$XPI" ]; then
echo "No XPI produced by web-ext sign — exiting"
ls -la extension/web-ext-artifacts/ || true
exit 1
fi
VERSION=$(grep -E '"version"' extension/package.json | head -1 | sed -E 's/.*"version"[[:space:]]*:[[:space:]]*"([^"]+)".*/\1/')
DEST="frontend/public/extension/fabledcurator-${VERSION}.xpi"
mkdir -p frontend/public/extension
cp "$XPI" frontend/public/extension/
# Also copy as -latest.xpi so the FC server can serve a stable URL.
# Wipe any prior versions so the directory doesn't grow each release.
rm -f frontend/public/extension/fabledcurator-*.xpi
cp "$XPI" "$DEST"
cp "$XPI" "frontend/public/extension/fabledcurator-latest.xpi"
git config user.name "FC extension CI"
git config user.email "noreply@fabledsword.com"
@@ -54,6 +66,6 @@ jobs:
if git diff --cached --quiet; then
echo "No changes to commit"
else
git commit -m "ext: publish signed XPI $(basename $XPI)"
git commit -m "ext: publish signed XPI fabledcurator-${VERSION}.xpi"
git push origin HEAD:main
fi