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` + ) } })