From e4b456bb2c3d032926b39ddab61fb834a12f27d8 Mon Sep 17 00:00:00 2001 From: Benjamin Lu Date: Wed, 25 Feb 2026 03:35:41 -0800 Subject: [PATCH] fix: publish desktop-specific frontend release artifact (#9206) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary - add a desktop-specific frontend release artifact (`dist-desktop.zip`) in release draft creation - build `dist-desktop.zip` with `DISTRIBUTION=desktop` - keep existing `dist.zip` behavior for core/PyPI consumers - extend `scripts/zipdist.js` to support custom source and output paths ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-9206-fix-publish-desktop-specific-frontend-release-artifact-3126d73d3650812495cdf6e9ad2ac280) by [Unito](https://www.unito.io) --- .github/workflows/release-draft-create.yaml | 10 +++++++++- scripts/zipdist.js | 11 ++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-draft-create.yaml b/.github/workflows/release-draft-create.yaml index 74d6c98981..c916386b2f 100644 --- a/.github/workflows/release-draft-create.yaml +++ b/.github/workflows/release-draft-create.yaml @@ -53,7 +53,13 @@ jobs: IS_NIGHTLY: ${{ case(github.ref == 'refs/heads/main', 'true', 'false') }} run: | pnpm install --frozen-lockfile - pnpm build + + # Desktop-specific release artifact with desktop distribution flags. + DISTRIBUTION=desktop pnpm build + pnpm zipdist ./dist ./dist-desktop.zip + + # Default release artifact for core/PyPI. + NX_SKIP_NX_CACHE=true pnpm build pnpm zipdist - name: Upload dist artifact uses: actions/upload-artifact@v6 @@ -62,6 +68,7 @@ jobs: path: | dist/ dist.zip + dist-desktop.zip draft_release: needs: build @@ -79,6 +86,7 @@ jobs: with: files: | dist.zip + dist-desktop.zip tag_name: v${{ needs.build.outputs.version }} target_commitish: ${{ github.event.pull_request.base.ref }} make_latest: >- diff --git a/scripts/zipdist.js b/scripts/zipdist.js index 383fa774aa..4f944c7f85 100644 --- a/scripts/zipdist.js +++ b/scripts/zipdist.js @@ -1,9 +1,14 @@ import zipdir from 'zip-dir' -zipdir('./dist', { saveTo: './dist.zip' }, function (err, buffer) { +const sourceDir = process.argv[2] || './dist' +const outputPath = process.argv[3] || './dist.zip' + +zipdir(sourceDir, { saveTo: outputPath }, function (err, buffer) { if (err) { - console.error('Error zipping "dist" directory:', err) + console.error(`Error zipping "${sourceDir}" directory:`, err) } else { - console.log('Successfully zipped "dist" directory.') + process.stdout.write( + `Successfully zipped "${sourceDir}" directory to "${outputPath}".\n` + ) } })