Skip to content

Commit e4b456b

Browse files
fix: publish desktop-specific frontend release artifact (#9206)
## 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)
1 parent 482ad40 commit e4b456b

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

.github/workflows/release-draft-create.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,13 @@ jobs:
5353
IS_NIGHTLY: ${{ case(github.ref == 'refs/heads/main', 'true', 'false') }}
5454
run: |
5555
pnpm install --frozen-lockfile
56-
pnpm build
56+
57+
# Desktop-specific release artifact with desktop distribution flags.
58+
DISTRIBUTION=desktop pnpm build
59+
pnpm zipdist ./dist ./dist-desktop.zip
60+
61+
# Default release artifact for core/PyPI.
62+
NX_SKIP_NX_CACHE=true pnpm build
5763
pnpm zipdist
5864
- name: Upload dist artifact
5965
uses: actions/upload-artifact@v6
@@ -62,6 +68,7 @@ jobs:
6268
path: |
6369
dist/
6470
dist.zip
71+
dist-desktop.zip
6572
6673
draft_release:
6774
needs: build
@@ -79,6 +86,7 @@ jobs:
7986
with:
8087
files: |
8188
dist.zip
89+
dist-desktop.zip
8290
tag_name: v${{ needs.build.outputs.version }}
8391
target_commitish: ${{ github.event.pull_request.base.ref }}
8492
make_latest: >-

scripts/zipdist.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
import zipdir from 'zip-dir'
22

3-
zipdir('./dist', { saveTo: './dist.zip' }, function (err, buffer) {
3+
const sourceDir = process.argv[2] || './dist'
4+
const outputPath = process.argv[3] || './dist.zip'
5+
6+
zipdir(sourceDir, { saveTo: outputPath }, function (err, buffer) {
47
if (err) {
5-
console.error('Error zipping "dist" directory:', err)
8+
console.error(`Error zipping "${sourceDir}" directory:`, err)
69
} else {
7-
console.log('Successfully zipped "dist" directory.')
10+
process.stdout.write(
11+
`Successfully zipped "${sourceDir}" directory to "${outputPath}".\n`
12+
)
813
}
914
})

0 commit comments

Comments
 (0)