-
Notifications
You must be signed in to change notification settings - Fork 0
113 lines (104 loc) · 4.67 KB
/
Copy pathrelease.yml
File metadata and controls
113 lines (104 loc) · 4.67 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
112
113
name: build-installers
on:
push:
tags: ["v*"]
workflow_dispatch: {}
permissions:
contents: write
jobs:
macos:
name: macOS ${{ matrix.arch }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- { runner: macos-latest, arch: arm64 }
- { runner: macos-15-intel, arch: x64 }
steps:
- uses: actions/checkout@v4
- name: Build portable tarball and .pkg
run: bash scripts/build-macos.sh ${{ matrix.arch }}
- name: Install the .pkg and verify
run: |
sudo installer -pkg dist/*.pkg -target /
. ./versions.env
GOT="$(/usr/local/bin/dsh --version)"
echo "installed dsh --version = $GOT"
test "$GOT" = "$DSH_VERSION"
- name: Mount the .dmg and verify DSH.app
run: |
. ./versions.env
hdiutil attach dist/*.dmg -mountpoint /tmp/dshdmg -nobrowse -quiet
test -x /tmp/dshdmg/DSH.app/Contents/MacOS/DSH
test -L /tmp/dshdmg/Applications
GOT="$(/tmp/dshdmg/DSH.app/Contents/Resources/dsh/bin/dsh --version)"
echo "DSH.app payload dsh --version = $GOT"
test "$GOT" = "$DSH_VERSION"
hdiutil detach /tmp/dshdmg -quiet
- uses: actions/upload-artifact@v4
with:
name: macos-${{ matrix.arch }}
path: dist/*
if-no-files-found: error
windows:
name: Windows x64
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Build portable zip and setup.exe
shell: pwsh
run: ./scripts/build-windows.ps1
- name: Install the setup.exe and verify
shell: pwsh
run: |
$setup = Get-ChildItem dist/dsh-setup-*.exe | Select-Object -First 1
Start-Process -Wait -FilePath $setup.FullName -ArgumentList "/VERYSILENT","/SUPPRESSMSGBOXES","/NORESTART","/TASKS=addtopath"
$v = (& cmd /c "`"$env:LOCALAPPDATA\Programs\dsh\bin\dsh.cmd`" --version") | Select-Object -Last 1
$v = "$v".Trim()
$want = (Get-Content versions.env | Select-String '^DSH_VERSION=(.+)$').Matches.Groups[1].Value
Write-Host "installed dsh --version = $v"
if ($v -ne $want) { throw "installed version '$v' != expected '$want'" }
- uses: actions/upload-artifact@v4
with:
name: windows-x64
path: dist/*
if-no-files-found: error
release:
name: Publish GitHub release
if: startsWith(github.ref, 'refs/tags/')
needs: [macos, windows]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true
- name: Generate checksums
run: |
cd dist
sha256sum * > SHA256SUMS.txt
cat SHA256SUMS.txt
- name: Create release
env:
GH_TOKEN: ${{ github.token }}
run: |
. ./versions.env
cat > notes.md <<EOF
Unofficial installers for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) \`dsh\` **$DSH_VERSION**, with Node.js v$NODE_VERSION bundled. No prerequisites — install and run \`dsh web\`.
非官方 DeepSeek Harness (dsh) 安装包,内置 Node.js v$NODE_VERSION,无需预装任何环境,装完直接 \`dsh web\`。
| Platform | File |
|---|---|
| macOS Apple Silicon | \`dsh-$DSH_VERSION-macos-arm64.dmg\` (DSH.app) / \`.pkg\` (CLI) / \`.tar.gz\` |
| macOS Intel | \`dsh-$DSH_VERSION-macos-x64.dmg\` (DSH.app) / \`.pkg\` (CLI) / \`.tar.gz\` |
| Windows x64 | \`dsh-setup-$DSH_VERSION-win-x64.exe\` / \`.zip\` |
**macOS DMG**: drag DSH.app to Applications, double-click — it starts the local \`dsh web\` service and opens the UI as a chromeless app window (Chrome/Edge \`--app=\` mode; default browser otherwise). Unsigned: right-click → Open on first launch.
**macOS pkg**: installs the \`dsh\` CLI to /usr/local/bin. Unsigned — right-click → Open, or \`sudo installer -pkg <file> -target /\`. Uninstall: \`sudo rm -rf /usr/local/dsh /usr/local/bin/dsh\`.
**Windows**: SmartScreen may warn (unsigned) — "More info" → "Run anyway". Installs per-user, no admin needed.
All binaries are built and verified by [GitHub Actions](https://github.com/codeAnqiang-ma/dsh-installers/actions) from the official \`@deepseek-ai/dsh\` npm package and official Node.js binaries, unmodified. Verify with \`SHA256SUMS.txt\`.
EOF
gh release create "$GITHUB_REF_NAME" dist/* \
--verify-tag \
--title "dsh $DSH_VERSION installers" \
--notes-file notes.md