From 788b1852e42afa8fce58964263b06864c7ff28b3 Mon Sep 17 00:00:00 2001 From: jsgerrchg Date: Fri, 29 May 2026 05:10:24 -0400 Subject: [PATCH] Publish updater feeds before APT validation --- .github/workflows/release-desktop.yml | 66 +++++++++++++++++---------- 1 file changed, 42 insertions(+), 24 deletions(-) diff --git a/.github/workflows/release-desktop.yml b/.github/workflows/release-desktop.yml index caa6e791..f72bf255 100644 --- a/.github/workflows/release-desktop.yml +++ b/.github/workflows/release-desktop.yml @@ -777,6 +777,44 @@ jobs: } EOF + - name: Publish updater feeds to gh-pages + shell: bash + env: + CHANNEL: ${{ needs.prepare.outputs.channel }} + PAGES_DIR: ${{ runner.temp }}/gh-pages + run: | + ( + cd "$PAGES_DIR" + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git add "${CHANNEL}" .nojekyll + if git diff --cached --quiet; then + echo "No updater feed changes to publish." + else + git commit -m "Publish updater feeds for ${{ needs.prepare.outputs.tag }}" + git push origin HEAD:gh-pages + fi + ) + + - name: Print published feed URLs + shell: bash + run: | + node --input-type=module <<'EOF' + import fs from "node:fs"; + import path from "node:path"; + + const baseUrl = "${{ needs.prepare.outputs.pages_base_url }}".replace(/\/+$/, ""); + const channel = "${{ needs.prepare.outputs.channel }}"; + const metadataDir = path.resolve(".artifacts/release-targets"); + + for (const fileName of fs.readdirSync(metadataDir).filter((file) => file.endsWith(".json")).sort()) { + const metadata = JSON.parse( + fs.readFileSync(path.join(metadataDir, fileName), "utf8"), + ); + console.log(`${baseUrl}/${channel}/${metadata.feedRelativePath}`); + } + EOF + - name: Install APT repository tools run: sudo apt-get update && sudo apt-get install -y dpkg gnupg gzip @@ -860,40 +898,20 @@ jobs: apt-get install -y --download-only "neverwrite=$VERSION" ' - - name: Publish pages artifacts to gh-pages + - name: Publish APT repository to gh-pages shell: bash env: - CHANNEL: ${{ needs.prepare.outputs.channel }} PAGES_DIR: ${{ runner.temp }}/gh-pages run: | ( cd "$PAGES_DIR" git config user.name "github-actions[bot]" git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - git add "${CHANNEL}" apt .nojekyll + git add apt .nojekyll if git diff --cached --quiet; then - echo "No pages artifact changes to publish." + echo "No APT repository changes to publish." else - git commit -m "Publish release pages artifacts for ${{ needs.prepare.outputs.tag }}" + git commit -m "Publish APT repository for ${{ needs.prepare.outputs.tag }}" git push origin HEAD:gh-pages fi ) - - - name: Print published feed URLs - shell: bash - run: | - node --input-type=module <<'EOF' - import fs from "node:fs"; - import path from "node:path"; - - const baseUrl = "${{ needs.prepare.outputs.pages_base_url }}".replace(/\/+$/, ""); - const channel = "${{ needs.prepare.outputs.channel }}"; - const metadataDir = path.resolve(".artifacts/release-targets"); - - for (const fileName of fs.readdirSync(metadataDir).filter((file) => file.endsWith(".json")).sort()) { - const metadata = JSON.parse( - fs.readFileSync(path.join(metadataDir, fileName), "utf8"), - ); - console.log(`${baseUrl}/${channel}/${metadata.feedRelativePath}`); - } - EOF