From 47d760550d7274b9e1e34d74fd060c5828ae657f Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Mon, 25 May 2026 18:22:01 -0400 Subject: [PATCH] =?UTF-8?q?fix(ext-ci):=20glob=20AMO-renamed=20signed=20XP?= =?UTF-8?q?I=20+=20canonicalize=20to=20fabledcurator-.xpi=20?= =?UTF-8?q?=E2=80=94=20Co-Authored-By:=20Claude=20Opus=204.7=20(1M=20conte?= =?UTF-8?q?xt)=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .forgejo/workflows/extension.yml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.forgejo/workflows/extension.yml b/.forgejo/workflows/extension.yml index 63c23e8..dc54c95 100644 --- a/.forgejo/workflows/extension.yml +++ b/.forgejo/workflows/extension.yml @@ -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