forked from zed-industries/zed
-
Notifications
You must be signed in to change notification settings - Fork 0
291 lines (249 loc) · 9.83 KB
/
Copy pathinternal_release.yml
File metadata and controls
291 lines (249 loc) · 9.83 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
# Internal Release workflow — independent of upstream release.yml / release_nightly.yml.
#
# Trigger:
# - Push a tag matching `r*` (e.g. `git tag r0.1.0 && git push origin r0.1.0`)
# - Or manually via Actions → Internal Release → Run workflow
#
# Secrets (all optional — builds still succeed without them):
# MACOS_CERTIFICATE / MACOS_CERTIFICATE_PASSWORD — Apple code signing (.p12)
# APPLE_NOTARIZATION_KEY / _KEY_ID / _ISSUER_ID — Apple notarization
# ZED_CLIENT_CHECKSUM_SEED — checksum seed baked into binary
#
# Notes:
# - Windows builds run with CI="" to skip Azure code-signing checks.
# To enable signing, set the AZURE_* / ACCOUNT_NAME / CERT_PROFILE_NAME /
# ENDPOINT / FILE_DIGEST / TIMESTAMP_* secrets and remove the `CI: ""` override.
# - Linux aarch64 requires an ARM runner. GitHub offers `ubuntu-22.04-arm` for
# Teams/Enterprise plans. If unavailable, remove or comment out the job.
name: Internal Release
on:
push:
tags:
- "r*"
workflow_dispatch:
inputs:
platforms:
description: "Platforms to build (comma-separated: mac,linux,windows)"
required: false
default: "mac,linux,windows"
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: "1"
CARGO_INCREMENTAL: "0"
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
defaults:
run:
shell: bash -euxo pipefail {0}
# ─── macOS ────────────────────────────────────────────────────
jobs:
bundle_mac_aarch64:
if: github.event_name == 'push' || contains(github.event.inputs.platforms, 'mac')
runs-on: macos-14
timeout-minutes: 90
steps:
- uses: actions/checkout@v4
- name: Set release channel
run: echo "nightly" > crates/zed/RELEASE_CHANNEL
- name: Bundle macOS aarch64
run: ./script/bundle-mac aarch64-apple-darwin
env:
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
APPLE_NOTARIZATION_KEY: ${{ secrets.APPLE_NOTARIZATION_KEY }}
APPLE_NOTARIZATION_KEY_ID: ${{ secrets.APPLE_NOTARIZATION_KEY_ID }}
APPLE_NOTARIZATION_ISSUER_ID: ${{ secrets.APPLE_NOTARIZATION_ISSUER_ID }}
- uses: actions/upload-artifact@v4
with:
name: Zed-aarch64.dmg
path: target/aarch64-apple-darwin/release/Zed-aarch64.dmg
if-no-files-found: error
- uses: actions/upload-artifact@v4
with:
name: zed-remote-server-macos-aarch64.gz
path: target/zed-remote-server-macos-aarch64.gz
if-no-files-found: warn
bundle_mac_x86_64:
if: github.event_name == 'push' || contains(github.event.inputs.platforms, 'mac')
runs-on: macos-13
timeout-minutes: 90
steps:
- uses: actions/checkout@v4
- name: Set release channel
run: echo "nightly" > crates/zed/RELEASE_CHANNEL
- name: Bundle macOS x86_64
run: ./script/bundle-mac x86_64-apple-darwin
env:
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
APPLE_NOTARIZATION_KEY: ${{ secrets.APPLE_NOTARIZATION_KEY }}
APPLE_NOTARIZATION_KEY_ID: ${{ secrets.APPLE_NOTARIZATION_KEY_ID }}
APPLE_NOTARIZATION_ISSUER_ID: ${{ secrets.APPLE_NOTARIZATION_ISSUER_ID }}
- uses: actions/upload-artifact@v4
with:
name: Zed-x86_64.dmg
path: target/x86_64-apple-darwin/release/Zed-x86_64.dmg
if-no-files-found: error
- uses: actions/upload-artifact@v4
with:
name: zed-remote-server-macos-x86_64.gz
path: target/zed-remote-server-macos-x86_64.gz
if-no-files-found: warn
# ─── Linux ──────────────────────────────────────────────────
bundle_linux_x86_64:
if: github.event_name == 'push' || contains(github.event.inputs.platforms, 'linux')
runs-on: ubuntu-22.04
timeout-minutes: 90
env:
CC: clang
CXX: clang++
steps:
- uses: actions/checkout@v4
- name: Set release channel
run: echo "nightly" > crates/zed/RELEASE_CHANNEL
- name: Install system dependencies
run: ./script/linux
- name: Download WASI SDK
run: ./script/download-wasi-sdk
- name: Bundle Linux x86_64
run: ./script/bundle-linux
- uses: actions/upload-artifact@v4
with:
name: zed-linux-x86_64.tar.gz
path: target/release/zed-linux-x86_64.tar.gz
if-no-files-found: error
- uses: actions/upload-artifact@v4
with:
name: zed-remote-server-linux-x86_64.gz
path: target/zed-remote-server-linux-x86_64.gz
if-no-files-found: warn
# Requires ARM runner — GitHub Teams/Enterprise plan, or self-hosted.
# Comment out this job if ARM runners are unavailable.
bundle_linux_aarch64:
if: github.event_name == 'push' || contains(github.event.inputs.platforms, 'linux')
runs-on: ubuntu-22.04-arm
timeout-minutes: 90
env:
CC: clang
CXX: clang++
steps:
- uses: actions/checkout@v4
- name: Set release channel
run: echo "nightly" > crates/zed/RELEASE_CHANNEL
- name: Install system dependencies
run: ./script/linux
- name: Download WASI SDK
run: ./script/download-wasi-sdk
- name: Bundle Linux aarch64
run: ./script/bundle-linux
- uses: actions/upload-artifact@v4
with:
name: zed-linux-aarch64.tar.gz
path: target/release/zed-linux-aarch64.tar.gz
if-no-files-found: error
- uses: actions/upload-artifact@v4
with:
name: zed-remote-server-linux-aarch64.gz
path: target/zed-remote-server-linux-aarch64.gz
if-no-files-found: warn
# ─── Windows ────────────────────────────────────────────────
bundle_windows_x86_64:
if: github.event_name == 'push' || contains(github.event.inputs.platforms, 'windows')
runs-on: windows-2022
timeout-minutes: 90
env:
CI: ""
steps:
- uses: actions/checkout@v4
- name: Set release channel
run: |
$ErrorActionPreference = "Stop"
"nightly" | Set-Content -Path "crates/zed/RELEASE_CHANNEL" -NoNewline
shell: pwsh
- name: Bundle Windows x86_64
run: script/bundle-windows.ps1 -Architecture x86_64
shell: pwsh
- uses: actions/upload-artifact@v4
with:
name: Zed-x86_64.exe
path: target/Zed-x86_64.exe
if-no-files-found: error
- uses: actions/upload-artifact@v4
with:
name: zed-remote-server-windows-x86_64.zip
path: target/zed-remote-server-windows-x86_64.zip
if-no-files-found: warn
bundle_windows_aarch64:
if: github.event_name == 'push' || contains(github.event.inputs.platforms, 'windows')
runs-on: windows-2022
timeout-minutes: 90
env:
CI: ""
steps:
- uses: actions/checkout@v4
- name: Set release channel
run: |
$ErrorActionPreference = "Stop"
"nightly" | Set-Content -Path "crates/zed/RELEASE_CHANNEL" -NoNewline
shell: pwsh
- name: Bundle Windows aarch64
run: script/bundle-windows.ps1 -Architecture aarch64
shell: pwsh
- uses: actions/upload-artifact@v4
with:
name: Zed-aarch64.exe
path: target/Zed-aarch64.exe
if-no-files-found: error
- uses: actions/upload-artifact@v4
with:
name: zed-remote-server-windows-aarch64.zip
path: target/zed-remote-server-windows-aarch64.zip
if-no-files-found: warn
# ─── GitHub Release ─────────────────────────────────────────
create_release:
needs:
- bundle_mac_aarch64
- bundle_mac_x86_64
- bundle_linux_x86_64
- bundle_linux_aarch64
- bundle_windows_x86_64
- bundle_windows_aarch64
if: always() && !cancelled() && startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
with:
path: ./artifacts/
- name: Collect release artifacts
run: |
mkdir -p release/
for dir in ./artifacts/*/; do
for file in "$dir"*; do
[ -f "$file" ] && cp "$file" release/
done
done
echo "=== Release artifacts ==="
ls -lh release/
- name: Create draft GitHub Release
run: |
TAG="${GITHUB_REF_NAME}"
gh release create "$TAG" \
--repo "$GITHUB_REPOSITORY" \
--title "Internal Release ${TAG}" \
--notes "$(cat <<'EOF'
Build from ${{ github.sha }}
| Platform | Client | Remote Server |
|----------|--------|---------------|
| macOS Apple Silicon | Zed-aarch64.dmg | zed-remote-server-macos-aarch64.gz |
| macOS Intel | Zed-x86_64.dmg | zed-remote-server-macos-x86_64.gz |
| Linux x86_64 | zed-linux-x86_64.tar.gz | zed-remote-server-linux-x86_64.gz |
| Linux aarch64 | zed-linux-aarch64.tar.gz | zed-remote-server-linux-aarch64.gz |
| Windows x86_64 | Zed-x86_64.exe | zed-remote-server-windows-x86_64.zip |
| Windows aarch64 | Zed-aarch64.exe | zed-remote-server-windows-aarch64.zip |
EOF
)" \
--draft \
release/* 2>/dev/null || true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}