fix: select Firefox artifact by release version

This commit is contained in:
mirivlad 2026-07-11 22:33:08 +08:00
parent 619ff97b61
commit d8bd1d1828
2 changed files with 3 additions and 3 deletions

View File

@ -44,9 +44,9 @@ if [[ -z "$VERSION" || -z "$ADDON_ID" ]]; then
exit 1
fi
SIGNED_XPI="$(find "$ARTIFACTS_DIR" -maxdepth 1 -type f -name '*.xpi' | sort | tail -n 1 || true)"
SIGNED_XPI="$(find "$ARTIFACTS_DIR" -maxdepth 1 -type f -name "*-${VERSION}.xpi" | sort | tail -n 1 || true)"
if [[ -z "$SIGNED_XPI" ]]; then
echo "ERROR: no signed XPI found in $ARTIFACTS_DIR" >&2
echo "ERROR: no signed XPI for version $VERSION found in $ARTIFACTS_DIR" >&2
exit 1
fi

View File

@ -84,7 +84,7 @@ echo "Using AMO API proxy from WEB_EXT_API_PROXY"
npx web-ext "${SIGN_ARGS[@]}"
SIGNED_XPI="$(find "$ARTIFACTS_DIR" -maxdepth 1 -type f -name '*.xpi' | sort | tail -n 1 || true)"
SIGNED_XPI="$(find "$ARTIFACTS_DIR" -maxdepth 1 -type f -name '*.xpi' -printf '%T@ %p\n' | sort -n | tail -n 1 | cut -d' ' -f2- || true)"
if [[ -z "$SIGNED_XPI" ]]; then
echo "ERROR: signed XPI was not created in $ARTIFACTS_DIR" >&2
exit 1