fix
Firefox extension release / Build, package and publish SKYNET SSO (release) Failing after 45s

Cette révision appartient à :
jimmyGALLAND authored and Jimmy GALLAND committed 2026-11-22 12:22:43 +01:00
1 Parent 5e5b4c5983
révision 670d251a6f
3 files changed
+36 -276

No files matched your search

+30 -23
Voir le fichier
@@ -1,4 +1,4 @@
name: Firefox extension release
name: Firefox extension release
on:
release:
@@ -10,9 +10,10 @@ permissions:
jobs:
build-and-publish:
name: Build, package and publish SKYNET SSO
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
env:
EXTENSION_DIR: src/mod/auth/sso/zorxauth/extension
EXTENSION_DIR: src/
RELEASE_TAG: ${{ gitea.event.release.tag_name }}
RELEASE_ID: ${{ gitea.event.release.id }}
REPOSITORY: ${{ gitea.repository }}
@@ -81,11 +82,6 @@ jobs:
echo "Release ${RELEASE_TAG} matches manifest version ${MANIFEST_VERSION}."
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
- name: Install build tools
run: |
npm install --no-save --no-audit --no-fund \
@@ -109,7 +105,7 @@ jobs:
while IFS= read -r -d '' file; do
tmp="${file}.min"
npx --no-install terser "${file}" \
--compress --mangle --format "comments=false" \
--compress --mangle \
--output "${tmp}"
mv "${tmp}" "${file}"
done < <(find dist -type f -name '*.js' -print0)
@@ -123,18 +119,14 @@ jobs:
done < <(find dist -type f -name '*.css' -print0)
while IFS= read -r -d '' file; do
tmp="${file}.min"
npx --no-install html-minifier-terser \
--collapse-whitespace \
--remove-comments \
--minify-css true \
--minify-js false \
--remove-optional-tags false \
--remove-redundant-attributes false \
--remove-attribute-quotes false \
--keep-closing-slash true \
"${file}" --output "${tmp}"
mv "${tmp}" "${file}"
tmp="${file}.min"
npx --no-install html-minifier-terser \
--collapse-whitespace \
--remove-comments \
--minify-css \
--keep-closing-slash \
"${file}" --output "${tmp}"
mv "${tmp}" "${file}"
done < <(find dist -type f -name '*.html' -print0)
# Validate that the resulting manifest is still valid JSON and
@@ -188,16 +180,31 @@ jobs:
set -euo pipefail
mkdir -p artifacts/amo
test -n "${AMO_JWT_ISSUER:-}" || {
echo "AMO_JWT_ISSUER absent"
exit 1
}
test -n "${AMO_JWT_SECRET:-}" || {
echo "AMO_JWT_SECRET absent"
exit 1
}
echo "Identifiants AMO présents."
echo "Longueur issuer : ${#AMO_JWT_ISSUER}"
echo "Longueur secret : ${#AMO_JWT_SECRET}"
npx --no-install web-ext sign \
--source-dir dist \
--artifacts-dir artifacts/amo \
--channel listed \
--channel unlisted \
--api-key "${AMO_JWT_ISSUER}" \
--api-secret "${AMO_JWT_SECRET}" \
--amo-metadata artifacts/amo-metadata.json \
--no-input
XPI="$(find artifacts/amo -maxdepth 1 -type f -name '*.xpi' -print -quit)"
if [[ -z "${XPI}" ]]; then
if [[ -z "${XPI}" ]]; then
echo "::error::AMO did not return a signed XPI."
exit 1
fi