From 42796684d76683aa30d233b0361c9ff0e8ca459a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Wed, 12 Nov 2025 18:55:27 +0100 Subject: [PATCH] add web extension to release --- .../workflows/release/build-and-release.yaml | 36 +++++++++++++++---- 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/release/build-and-release.yaml b/.gitea/workflows/release/build-and-release.yaml index 845bd15..2fc2060 100644 --- a/.gitea/workflows/release/build-and-release.yaml +++ b/.gitea/workflows/release/build-and-release.yaml @@ -6,8 +6,30 @@ on: - v** jobs: + webext-build: + runs-on: ubuntu-latest + container: + image: node:24 + steps: + - name: Checkout repository + uses: https://github.com/actions/checkout@v4 + - name: Install dependencies + run: cd web-extension/cl && npm install + - name: Build and sign web extension + env: + AMO_API_KEY: ${{ secrets.AMO_API_KEY }} + AMO_API_SECRET: ${{ secrets.AMO_API_SECRET }} + run: cd web-extension/cl && npm run sign + - name: Upload web extension artifact + uses: https://github.com/actions/upload-artifact@v4 + with: + name: webext-xpi + path: web-extension/cl/web-ext-artifacts/*.xpi + if-no-files-found: error + build-and-release: runs-on: ubuntu-latest + needs: [webext-build] steps: - name: Checkout repository uses: https://github.com/actions/checkout@v4 @@ -28,7 +50,6 @@ jobs: run: | set -euo pipefail DEB_FILE=$(ls target/debian/*.deb | head -n1) - env if [ -z "${DEB_FILE}" ]; then echo "No .deb file found in target/debian" >&2 exit 1 @@ -42,11 +63,11 @@ jobs: --upload-file "${DEB_FILE}" \ "${GITEA_SERVER_URL}/api/packages/${GITEA_OWNER}/debian/pool/${DISTRO}/main/upload" done - - name: Read release content - uses: https://github.com/jaywcjlove/github-action-read-file@main - id: read_release + - name: Download web extension artifact + uses: https://github.com/actions/download-artifact@v4 with: - path: .changes/${{ github.ref_name }}.md + name: webext-xpi + path: web-extension/cl/web-ext-artifacts - name: Release uses: https://gitea.com/akkuman/gitea-release-action@v1 env: @@ -54,6 +75,9 @@ jobs: with: files: |- config.toml.dist + web-extension/cl/web-ext-artifacts/*.xpi md5sum: true sha256sum: true - body_path: .changes/${{ github.ref_name }}.md + body: Test release + prerelease: true + #body_path: .changes/${{ github.ref_name }}.md