-
Notifications
You must be signed in to change notification settings - Fork 29
111 lines (95 loc) · 2.98 KB
/
Copy pathdesktop.yml
File metadata and controls
111 lines (95 loc) · 2.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: Desktop
on:
workflow_dispatch:
push:
tags:
- 'desktop-v*'
permissions:
contents: read
env:
PRIMARY_NODE_VERSION: '24'
DSH_TELEMETRY_DISABLED: '1'
jobs:
package:
name: ${{ matrix.name }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- name: macOS Apple Silicon
runner: macos-15
command: dist:mac:arm64
artifact: macos-arm64
- name: macOS Intel
runner: macos-15-intel
command: dist:mac:x64
artifact: macos-x64
- name: Windows x64
runner: windows-2025
command: dist:win:x64
artifact: windows-x64
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v6
with:
node-version: ${{ env.PRIMARY_NODE_VERSION }}
cache: pnpm
- name: Install
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm run build
- name: Test Windows dialog worker launch
if: runner.os == 'Windows'
run: pnpm exec vitest run packages/host/directory-picker-native/tests/win32-dialog-host.spec.ts
- name: Package
run: pnpm --filter @dshcode/desktop run ${{ matrix.command }}
- name: Smoke Windows packaged directory picker
if: runner.os == 'Windows'
run: node apps/desktop/scripts/smoke-packaged-win32-picker.mjs
- uses: actions/upload-artifact@v4
with:
name: dshcode-${{ matrix.artifact }}
path: |
.artifacts/desktop/release/*.dmg
.artifacts/desktop/release/*.zip
.artifacts/desktop/release/*.exe
if-no-files-found: error
retention-days: 14
release:
name: GitHub Release
if: startsWith(github.ref, 'refs/tags/desktop-v')
needs: package
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/download-artifact@v5
with:
pattern: dshcode-*
path: release
merge-multiple: true
- name: Generate checksums
working-directory: release
run: sha256sum * > SHA256SUMS.txt
- name: Publish release
env:
GH_TOKEN: ${{ github.token }}
RELEASE_NOTES: |
Installable DSHCode desktop preview for macOS and Windows.
These preview packages are not code-signed or notarized. macOS Gatekeeper and Windows SmartScreen may warn before first launch.
run: |
version="${GITHUB_REF_NAME#desktop-v}"
release_args=()
if [[ "$version" == *-* ]]; then
release_args+=(--prerelease)
fi
gh release create "$GITHUB_REF_NAME" release/* \
--repo "$GITHUB_REPOSITORY" \
--title "DSHCode $version" \
--notes "$RELEASE_NOTES" \
--verify-tag \
"${release_args[@]}"