From 807b77c7819ecfc39ae369bda4573fcb3a751ca8 Mon Sep 17 00:00:00 2001 From: Kenneth Hendricks <50819541+kenhendricks00@users.noreply.github.com> Date: Sun, 25 Jan 2026 16:42:14 -0500 Subject: [PATCH] Update release workflow to manage Firefox updates.json Adds a step to update Firefox updates.json and commit changes. --- .github/workflows/release.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c5051c6..7b79bca 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -104,3 +104,30 @@ jobs: asset_path: dist/FMHY-SafeGuard_${{ env.VERSION }}.firefox.xpi asset_name: FMHY-SafeGuard_${{ env.VERSION }}.firefox.xpi asset_content_type: application/x-xpinstall + + - name: Update Firefox updates.json + if: env.VERSION != 'dev-version' + run: | + cat > updates.json << EOF + { + "addons": { + "{5d554479-7cc4-487f-bd25-d8fc67a42602}": { + "updates": [ + { + "version": "${VERSION#v}", + "update_link": "https://github.com/fmhy/FMHY-SafeGuard/releases/download/${{ env.VERSION }}/FMHY-SafeGuard_${{ env.VERSION }}.firefox.xpi" + } + ] + } + } + } + EOF + + - name: Commit and Push updates.json + if: env.VERSION != 'dev-version' + run: | + git config --local user.email "github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" + git add updates.json + git commit -m "Update Firefox updates.json for ${{ env.VERSION }}" || echo "No changes to commit" + git push origin HEAD:main