1# Generated from xtask::workflows::release
2# Rebuild with `cargo xtask workflows`.
3name: release
4env:
5 CARGO_TERM_COLOR: always
6 RUST_BACKTRACE: '1'
7on:
8 push:
9 tags:
10 - v*
11jobs:
12 run_tests_mac:
13 if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
14 runs-on: namespace-profile-mac-large
15 steps:
16 - name: steps::checkout_repo
17 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
18 with:
19 clean: false
20 - name: steps::setup_cargo_config
21 run: |
22 mkdir -p ./../.cargo
23 cp ./.cargo/ci-config.toml ./../.cargo/config.toml
24 - name: steps::cache_rust_dependencies_namespace
25 uses: namespacelabs/nscloud-cache-action@v1
26 with:
27 cache: rust
28 path: ~/.rustup
29 - name: steps::setup_node
30 uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
31 with:
32 node-version: '20'
33 - name: steps::cargo_install_nextest
34 uses: taiki-e/install-action@nextest
35 - name: steps::clear_target_dir_if_large
36 run: ./script/clear-target-dir-if-larger-than 300
37 - name: steps::setup_sccache
38 run: ./script/setup-sccache
39 env:
40 R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }}
41 R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
42 R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
43 SCCACHE_BUCKET: sccache-zed
44 - name: steps::cargo_nextest
45 run: cargo nextest run --workspace --no-fail-fast --no-tests=warn
46 - name: steps::show_sccache_stats
47 run: sccache --show-stats || true
48 - name: steps::cleanup_cargo_config
49 if: always()
50 run: |
51 rm -rf ./../.cargo
52 timeout-minutes: 60
53 run_tests_linux:
54 if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
55 runs-on: namespace-profile-16x32-ubuntu-2204
56 env:
57 CC: clang
58 CXX: clang++
59 steps:
60 - name: steps::checkout_repo
61 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
62 with:
63 clean: false
64 - name: steps::setup_cargo_config
65 run: |
66 mkdir -p ./../.cargo
67 cp ./.cargo/ci-config.toml ./../.cargo/config.toml
68 - name: steps::cache_rust_dependencies_namespace
69 uses: namespacelabs/nscloud-cache-action@v1
70 with:
71 cache: rust
72 path: ~/.rustup
73 - name: steps::setup_linux
74 run: ./script/linux
75 - name: steps::install_mold
76 run: ./script/install-mold
77 - name: steps::download_wasi_sdk
78 run: ./script/download-wasi-sdk
79 - name: steps::setup_node
80 uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
81 with:
82 node-version: '20'
83 - name: steps::cargo_install_nextest
84 uses: taiki-e/install-action@nextest
85 - name: steps::clear_target_dir_if_large
86 run: ./script/clear-target-dir-if-larger-than 250
87 - name: steps::setup_sccache
88 run: ./script/setup-sccache
89 env:
90 R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }}
91 R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
92 R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
93 SCCACHE_BUCKET: sccache-zed
94 - name: steps::cargo_nextest
95 run: cargo nextest run --workspace --no-fail-fast --no-tests=warn
96 - name: steps::show_sccache_stats
97 run: sccache --show-stats || true
98 - name: steps::cleanup_cargo_config
99 if: always()
100 run: |
101 rm -rf ./../.cargo
102 timeout-minutes: 60
103 services:
104 postgres:
105 image: postgres:15
106 env:
107 POSTGRES_HOST_AUTH_METHOD: trust
108 ports:
109 - 5432:5432
110 options: --health-cmd pg_isready --health-interval 500ms --health-timeout 5s --health-retries 10
111 run_tests_windows:
112 if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
113 runs-on: self-32vcpu-windows-2022
114 steps:
115 - name: steps::checkout_repo
116 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
117 with:
118 clean: false
119 - name: steps::setup_cargo_config
120 run: |
121 New-Item -ItemType Directory -Path "./../.cargo" -Force
122 Copy-Item -Path "./.cargo/ci-config.toml" -Destination "./../.cargo/config.toml"
123 shell: pwsh
124 - name: steps::setup_node
125 uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
126 with:
127 node-version: '20'
128 - name: steps::clear_target_dir_if_large
129 run: ./script/clear-target-dir-if-larger-than.ps1 250
130 shell: pwsh
131 - name: steps::setup_sccache
132 run: ./script/setup-sccache.ps1
133 shell: pwsh
134 env:
135 R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }}
136 R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
137 R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
138 SCCACHE_BUCKET: sccache-zed
139 - name: steps::cargo_nextest
140 run: cargo nextest run --workspace --no-fail-fast --no-tests=warn
141 shell: pwsh
142 - name: steps::show_sccache_stats
143 run: if ($env:RUSTC_WRAPPER) { & $env:RUSTC_WRAPPER --show-stats }; exit 0
144 shell: pwsh
145 - name: steps::cleanup_cargo_config
146 if: always()
147 run: |
148 Remove-Item -Recurse -Path "./../.cargo" -Force -ErrorAction SilentlyContinue
149 shell: pwsh
150 timeout-minutes: 60
151 clippy_mac:
152 if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
153 runs-on: namespace-profile-mac-large
154 steps:
155 - name: steps::checkout_repo
156 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
157 with:
158 clean: false
159 - name: steps::setup_cargo_config
160 run: |
161 mkdir -p ./../.cargo
162 cp ./.cargo/ci-config.toml ./../.cargo/config.toml
163 - name: steps::cache_rust_dependencies_namespace
164 uses: namespacelabs/nscloud-cache-action@v1
165 with:
166 cache: rust
167 path: ~/.rustup
168 - name: steps::setup_sccache
169 run: ./script/setup-sccache
170 env:
171 R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }}
172 R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
173 R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
174 SCCACHE_BUCKET: sccache-zed
175 - name: steps::clippy
176 run: ./script/clippy
177 - name: steps::show_sccache_stats
178 run: sccache --show-stats || true
179 timeout-minutes: 60
180 clippy_linux:
181 if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
182 runs-on: namespace-profile-16x32-ubuntu-2204
183 env:
184 CC: clang
185 CXX: clang++
186 steps:
187 - name: steps::checkout_repo
188 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
189 with:
190 clean: false
191 - name: steps::setup_cargo_config
192 run: |
193 mkdir -p ./../.cargo
194 cp ./.cargo/ci-config.toml ./../.cargo/config.toml
195 - name: steps::cache_rust_dependencies_namespace
196 uses: namespacelabs/nscloud-cache-action@v1
197 with:
198 cache: rust
199 path: ~/.rustup
200 - name: steps::setup_linux
201 run: ./script/linux
202 - name: steps::install_mold
203 run: ./script/install-mold
204 - name: steps::download_wasi_sdk
205 run: ./script/download-wasi-sdk
206 - name: steps::setup_sccache
207 run: ./script/setup-sccache
208 env:
209 R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }}
210 R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
211 R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
212 SCCACHE_BUCKET: sccache-zed
213 - name: steps::clippy
214 run: ./script/clippy
215 - name: steps::show_sccache_stats
216 run: sccache --show-stats || true
217 timeout-minutes: 60
218 clippy_windows:
219 if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
220 runs-on: self-32vcpu-windows-2022
221 steps:
222 - name: steps::checkout_repo
223 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
224 with:
225 clean: false
226 - name: steps::setup_cargo_config
227 run: |
228 New-Item -ItemType Directory -Path "./../.cargo" -Force
229 Copy-Item -Path "./.cargo/ci-config.toml" -Destination "./../.cargo/config.toml"
230 shell: pwsh
231 - name: steps::setup_sccache
232 run: ./script/setup-sccache.ps1
233 shell: pwsh
234 env:
235 R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }}
236 R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
237 R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
238 SCCACHE_BUCKET: sccache-zed
239 - name: steps::clippy
240 run: ./script/clippy.ps1
241 shell: pwsh
242 - name: steps::show_sccache_stats
243 run: if ($env:RUSTC_WRAPPER) { & $env:RUSTC_WRAPPER --show-stats }; exit 0
244 shell: pwsh
245 timeout-minutes: 60
246 check_scripts:
247 if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
248 runs-on: namespace-profile-2x4-ubuntu-2404
249 steps:
250 - name: steps::checkout_repo
251 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
252 with:
253 clean: false
254 - name: run_tests::check_scripts::run_shellcheck
255 run: ./script/shellcheck-scripts error
256 - id: get_actionlint
257 name: run_tests::check_scripts::download_actionlint
258 run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
259 - name: run_tests::check_scripts::run_actionlint
260 run: '"$ACTIONLINT_BIN" -color'
261 env:
262 ACTIONLINT_BIN: ${{ steps.get_actionlint.outputs.executable }}
263 - name: steps::cache_rust_dependencies_namespace
264 uses: namespacelabs/nscloud-cache-action@v1
265 with:
266 cache: rust
267 path: ~/.rustup
268 - name: run_tests::check_scripts::check_xtask_workflows
269 run: |
270 cargo xtask workflows
271 if ! git diff --exit-code .github; then
272 echo "Error: .github directory has uncommitted changes after running 'cargo xtask workflows'"
273 echo "Please run 'cargo xtask workflows' locally and commit the changes"
274 exit 1
275 fi
276 timeout-minutes: 60
277 create_draft_release:
278 if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
279 runs-on: namespace-profile-2x4-ubuntu-2404
280 steps:
281 - name: steps::checkout_repo
282 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
283 with:
284 clean: false
285 fetch-depth: 25
286 ref: ${{ github.ref }}
287 - name: script/determine-release-channel
288 run: script/determine-release-channel
289 - name: mkdir -p target/
290 run: mkdir -p target/
291 - name: release::create_draft_release::generate_release_notes
292 run: node --redirect-warnings=/dev/null ./script/draft-release-notes "$RELEASE_VERSION" "$RELEASE_CHANNEL" > target/release-notes.md
293 - name: release::create_draft_release::create_release
294 run: script/create-draft-release target/release-notes.md
295 env:
296 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
297 timeout-minutes: 60
298 bundle_linux_aarch64:
299 needs:
300 - run_tests_linux
301 - clippy_linux
302 - check_scripts
303 runs-on: namespace-profile-8x32-ubuntu-2004-arm-m4
304 env:
305 CARGO_INCREMENTAL: 0
306 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
307 ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
308 CC: clang-18
309 CXX: clang++-18
310 steps:
311 - name: steps::checkout_repo
312 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
313 with:
314 clean: false
315 - name: steps::setup_sentry
316 uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
317 with:
318 token: ${{ secrets.SENTRY_AUTH_TOKEN }}
319 - name: steps::setup_linux
320 run: ./script/linux
321 - name: steps::install_mold
322 run: ./script/install-mold
323 - name: steps::download_wasi_sdk
324 run: ./script/download-wasi-sdk
325 - name: ./script/bundle-linux
326 run: ./script/bundle-linux
327 - name: '@actions/upload-artifact zed-linux-aarch64.tar.gz'
328 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
329 with:
330 name: zed-linux-aarch64.tar.gz
331 path: target/release/zed-linux-aarch64.tar.gz
332 if-no-files-found: error
333 - name: '@actions/upload-artifact zed-remote-server-linux-aarch64.gz'
334 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
335 with:
336 name: zed-remote-server-linux-aarch64.gz
337 path: target/zed-remote-server-linux-aarch64.gz
338 if-no-files-found: error
339 timeout-minutes: 60
340 bundle_linux_x86_64:
341 needs:
342 - run_tests_linux
343 - clippy_linux
344 - check_scripts
345 runs-on: namespace-profile-32x64-ubuntu-2004
346 env:
347 CARGO_INCREMENTAL: 0
348 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
349 ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
350 CC: clang-18
351 CXX: clang++-18
352 steps:
353 - name: steps::checkout_repo
354 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
355 with:
356 clean: false
357 - name: steps::setup_sentry
358 uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
359 with:
360 token: ${{ secrets.SENTRY_AUTH_TOKEN }}
361 - name: steps::setup_linux
362 run: ./script/linux
363 - name: steps::install_mold
364 run: ./script/install-mold
365 - name: steps::download_wasi_sdk
366 run: ./script/download-wasi-sdk
367 - name: ./script/bundle-linux
368 run: ./script/bundle-linux
369 - name: '@actions/upload-artifact zed-linux-x86_64.tar.gz'
370 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
371 with:
372 name: zed-linux-x86_64.tar.gz
373 path: target/release/zed-linux-x86_64.tar.gz
374 if-no-files-found: error
375 - name: '@actions/upload-artifact zed-remote-server-linux-x86_64.gz'
376 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
377 with:
378 name: zed-remote-server-linux-x86_64.gz
379 path: target/zed-remote-server-linux-x86_64.gz
380 if-no-files-found: error
381 timeout-minutes: 60
382 bundle_mac_aarch64:
383 needs:
384 - run_tests_mac
385 - clippy_mac
386 - check_scripts
387 runs-on: namespace-profile-mac-large
388 env:
389 CARGO_INCREMENTAL: 0
390 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
391 ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
392 MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
393 MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
394 APPLE_NOTARIZATION_KEY: ${{ secrets.APPLE_NOTARIZATION_KEY }}
395 APPLE_NOTARIZATION_KEY_ID: ${{ secrets.APPLE_NOTARIZATION_KEY_ID }}
396 APPLE_NOTARIZATION_ISSUER_ID: ${{ secrets.APPLE_NOTARIZATION_ISSUER_ID }}
397 steps:
398 - name: steps::checkout_repo
399 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
400 with:
401 clean: false
402 - name: steps::setup_node
403 uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
404 with:
405 node-version: '20'
406 - name: steps::setup_sentry
407 uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
408 with:
409 token: ${{ secrets.SENTRY_AUTH_TOKEN }}
410 - name: steps::clear_target_dir_if_large
411 run: ./script/clear-target-dir-if-larger-than 300
412 - name: run_bundling::bundle_mac::bundle_mac
413 run: ./script/bundle-mac aarch64-apple-darwin
414 - name: '@actions/upload-artifact Zed-aarch64.dmg'
415 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
416 with:
417 name: Zed-aarch64.dmg
418 path: target/aarch64-apple-darwin/release/Zed-aarch64.dmg
419 if-no-files-found: error
420 - name: '@actions/upload-artifact zed-remote-server-macos-aarch64.gz'
421 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
422 with:
423 name: zed-remote-server-macos-aarch64.gz
424 path: target/zed-remote-server-macos-aarch64.gz
425 if-no-files-found: error
426 timeout-minutes: 60
427 bundle_mac_x86_64:
428 needs:
429 - run_tests_mac
430 - clippy_mac
431 - check_scripts
432 runs-on: namespace-profile-mac-large
433 env:
434 CARGO_INCREMENTAL: 0
435 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
436 ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
437 MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
438 MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
439 APPLE_NOTARIZATION_KEY: ${{ secrets.APPLE_NOTARIZATION_KEY }}
440 APPLE_NOTARIZATION_KEY_ID: ${{ secrets.APPLE_NOTARIZATION_KEY_ID }}
441 APPLE_NOTARIZATION_ISSUER_ID: ${{ secrets.APPLE_NOTARIZATION_ISSUER_ID }}
442 steps:
443 - name: steps::checkout_repo
444 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
445 with:
446 clean: false
447 - name: steps::setup_node
448 uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
449 with:
450 node-version: '20'
451 - name: steps::setup_sentry
452 uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
453 with:
454 token: ${{ secrets.SENTRY_AUTH_TOKEN }}
455 - name: steps::clear_target_dir_if_large
456 run: ./script/clear-target-dir-if-larger-than 300
457 - name: run_bundling::bundle_mac::bundle_mac
458 run: ./script/bundle-mac x86_64-apple-darwin
459 - name: '@actions/upload-artifact Zed-x86_64.dmg'
460 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
461 with:
462 name: Zed-x86_64.dmg
463 path: target/x86_64-apple-darwin/release/Zed-x86_64.dmg
464 if-no-files-found: error
465 - name: '@actions/upload-artifact zed-remote-server-macos-x86_64.gz'
466 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
467 with:
468 name: zed-remote-server-macos-x86_64.gz
469 path: target/zed-remote-server-macos-x86_64.gz
470 if-no-files-found: error
471 timeout-minutes: 60
472 bundle_windows_aarch64:
473 needs:
474 - run_tests_windows
475 - clippy_windows
476 - check_scripts
477 runs-on: self-32vcpu-windows-2022
478 env:
479 CARGO_INCREMENTAL: 0
480 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
481 ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
482 AZURE_TENANT_ID: ${{ secrets.AZURE_SIGNING_TENANT_ID }}
483 AZURE_CLIENT_ID: ${{ secrets.AZURE_SIGNING_CLIENT_ID }}
484 AZURE_CLIENT_SECRET: ${{ secrets.AZURE_SIGNING_CLIENT_SECRET }}
485 ACCOUNT_NAME: ${{ vars.AZURE_SIGNING_ACCOUNT_NAME }}
486 CERT_PROFILE_NAME: ${{ vars.AZURE_SIGNING_CERT_PROFILE_NAME }}
487 ENDPOINT: ${{ vars.AZURE_SIGNING_ENDPOINT }}
488 FILE_DIGEST: SHA256
489 TIMESTAMP_DIGEST: SHA256
490 TIMESTAMP_SERVER: http://timestamp.acs.microsoft.com
491 steps:
492 - name: steps::checkout_repo
493 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
494 with:
495 clean: false
496 - name: steps::setup_sentry
497 uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
498 with:
499 token: ${{ secrets.SENTRY_AUTH_TOKEN }}
500 - name: run_bundling::bundle_windows::bundle_windows
501 run: script/bundle-windows.ps1 -Architecture aarch64
502 shell: pwsh
503 working-directory: ${{ env.ZED_WORKSPACE }}
504 - name: '@actions/upload-artifact Zed-aarch64.exe'
505 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
506 with:
507 name: Zed-aarch64.exe
508 path: target/Zed-aarch64.exe
509 if-no-files-found: error
510 - name: '@actions/upload-artifact zed-remote-server-windows-aarch64.zip'
511 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
512 with:
513 name: zed-remote-server-windows-aarch64.zip
514 path: target/zed-remote-server-windows-aarch64.zip
515 if-no-files-found: error
516 timeout-minutes: 60
517 bundle_windows_x86_64:
518 needs:
519 - run_tests_windows
520 - clippy_windows
521 - check_scripts
522 runs-on: self-32vcpu-windows-2022
523 env:
524 CARGO_INCREMENTAL: 0
525 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
526 ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
527 AZURE_TENANT_ID: ${{ secrets.AZURE_SIGNING_TENANT_ID }}
528 AZURE_CLIENT_ID: ${{ secrets.AZURE_SIGNING_CLIENT_ID }}
529 AZURE_CLIENT_SECRET: ${{ secrets.AZURE_SIGNING_CLIENT_SECRET }}
530 ACCOUNT_NAME: ${{ vars.AZURE_SIGNING_ACCOUNT_NAME }}
531 CERT_PROFILE_NAME: ${{ vars.AZURE_SIGNING_CERT_PROFILE_NAME }}
532 ENDPOINT: ${{ vars.AZURE_SIGNING_ENDPOINT }}
533 FILE_DIGEST: SHA256
534 TIMESTAMP_DIGEST: SHA256
535 TIMESTAMP_SERVER: http://timestamp.acs.microsoft.com
536 steps:
537 - name: steps::checkout_repo
538 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
539 with:
540 clean: false
541 - name: steps::setup_sentry
542 uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
543 with:
544 token: ${{ secrets.SENTRY_AUTH_TOKEN }}
545 - name: run_bundling::bundle_windows::bundle_windows
546 run: script/bundle-windows.ps1 -Architecture x86_64
547 shell: pwsh
548 working-directory: ${{ env.ZED_WORKSPACE }}
549 - name: '@actions/upload-artifact Zed-x86_64.exe'
550 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
551 with:
552 name: Zed-x86_64.exe
553 path: target/Zed-x86_64.exe
554 if-no-files-found: error
555 - name: '@actions/upload-artifact zed-remote-server-windows-x86_64.zip'
556 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
557 with:
558 name: zed-remote-server-windows-x86_64.zip
559 path: target/zed-remote-server-windows-x86_64.zip
560 if-no-files-found: error
561 timeout-minutes: 60
562 upload_release_assets:
563 needs:
564 - create_draft_release
565 - bundle_linux_aarch64
566 - bundle_linux_x86_64
567 - bundle_mac_aarch64
568 - bundle_mac_x86_64
569 - bundle_windows_aarch64
570 - bundle_windows_x86_64
571 runs-on: namespace-profile-4x8-ubuntu-2204
572 steps:
573 - name: release::download_workflow_artifacts
574 uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53
575 with:
576 path: ./artifacts/
577 - name: ls -lR ./artifacts
578 run: ls -lR ./artifacts
579 - name: release::prep_release_artifacts
580 run: |-
581 mkdir -p release-artifacts/
582
583 mv ./artifacts/Zed-aarch64.dmg/Zed-aarch64.dmg release-artifacts/Zed-aarch64.dmg
584 mv ./artifacts/Zed-x86_64.dmg/Zed-x86_64.dmg release-artifacts/Zed-x86_64.dmg
585 mv ./artifacts/zed-linux-aarch64.tar.gz/zed-linux-aarch64.tar.gz release-artifacts/zed-linux-aarch64.tar.gz
586 mv ./artifacts/zed-linux-x86_64.tar.gz/zed-linux-x86_64.tar.gz release-artifacts/zed-linux-x86_64.tar.gz
587 mv ./artifacts/Zed-x86_64.exe/Zed-x86_64.exe release-artifacts/Zed-x86_64.exe
588 mv ./artifacts/Zed-aarch64.exe/Zed-aarch64.exe release-artifacts/Zed-aarch64.exe
589 mv ./artifacts/zed-remote-server-macos-aarch64.gz/zed-remote-server-macos-aarch64.gz release-artifacts/zed-remote-server-macos-aarch64.gz
590 mv ./artifacts/zed-remote-server-macos-x86_64.gz/zed-remote-server-macos-x86_64.gz release-artifacts/zed-remote-server-macos-x86_64.gz
591 mv ./artifacts/zed-remote-server-linux-aarch64.gz/zed-remote-server-linux-aarch64.gz release-artifacts/zed-remote-server-linux-aarch64.gz
592 mv ./artifacts/zed-remote-server-linux-x86_64.gz/zed-remote-server-linux-x86_64.gz release-artifacts/zed-remote-server-linux-x86_64.gz
593 mv ./artifacts/zed-remote-server-windows-aarch64.zip/zed-remote-server-windows-aarch64.zip release-artifacts/zed-remote-server-windows-aarch64.zip
594 mv ./artifacts/zed-remote-server-windows-x86_64.zip/zed-remote-server-windows-x86_64.zip release-artifacts/zed-remote-server-windows-x86_64.zip
595 - name: gh release upload "$GITHUB_REF_NAME" --repo=zed-industries/zed release-artifacts/*
596 run: gh release upload "$GITHUB_REF_NAME" --repo=zed-industries/zed release-artifacts/*
597 env:
598 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
599 validate_release_assets:
600 needs:
601 - upload_release_assets
602 runs-on: namespace-profile-2x4-ubuntu-2404
603 steps:
604 - name: release::validate_release_assets
605 run: |
606 EXPECTED_ASSETS='["Zed-aarch64.dmg", "Zed-x86_64.dmg", "zed-linux-aarch64.tar.gz", "zed-linux-x86_64.tar.gz", "Zed-x86_64.exe", "Zed-aarch64.exe", "zed-remote-server-macos-aarch64.gz", "zed-remote-server-macos-x86_64.gz", "zed-remote-server-linux-aarch64.gz", "zed-remote-server-linux-x86_64.gz", "zed-remote-server-windows-aarch64.zip", "zed-remote-server-windows-x86_64.zip"]'
607 TAG="$GITHUB_REF_NAME"
608
609 ACTUAL_ASSETS=$(gh release view "$TAG" --repo=zed-industries/zed --json assets -q '[.assets[].name]')
610
611 MISSING_ASSETS=$(echo "$EXPECTED_ASSETS" | jq -r --argjson actual "$ACTUAL_ASSETS" '. - $actual | .[]')
612
613 if [ -n "$MISSING_ASSETS" ]; then
614 echo "Error: The following assets are missing from the release:"
615 echo "$MISSING_ASSETS"
616 exit 1
617 fi
618
619 echo "All expected assets are present in the release."
620 env:
621 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
622 auto_release_preview:
623 needs:
624 - validate_release_assets
625 if: startsWith(github.ref, 'refs/tags/v') && endsWith(github.ref, '-pre') && !endsWith(github.ref, '.0-pre')
626 runs-on: namespace-profile-2x4-ubuntu-2404
627 steps:
628 - id: get-app-token
629 name: steps::authenticate_as_zippy
630 uses: actions/create-github-app-token@bef1eaf1c0ac2b148ee2a0a74c65fbe6db0631f1
631 with:
632 app-id: ${{ secrets.ZED_ZIPPY_APP_ID }}
633 private-key: ${{ secrets.ZED_ZIPPY_APP_PRIVATE_KEY }}
634 - name: gh release edit "$GITHUB_REF_NAME" --repo=zed-industries/zed --draft=false
635 run: gh release edit "$GITHUB_REF_NAME" --repo=zed-industries/zed --draft=false
636 env:
637 GITHUB_TOKEN: ${{ steps.get-app-token.outputs.token }}
638 push_release_update_notification:
639 needs:
640 - create_draft_release
641 - upload_release_assets
642 - validate_release_assets
643 - auto_release_preview
644 - run_tests_mac
645 - run_tests_linux
646 - run_tests_windows
647 - clippy_mac
648 - clippy_linux
649 - clippy_windows
650 - check_scripts
651 - bundle_linux_aarch64
652 - bundle_linux_x86_64
653 - bundle_mac_aarch64
654 - bundle_mac_x86_64
655 - bundle_windows_aarch64
656 - bundle_windows_x86_64
657 if: always()
658 runs-on: namespace-profile-2x4-ubuntu-2404
659 steps:
660 - id: generate-webhook-message
661 name: release::generate_slack_message
662 run: |
663 MESSAGE=$(TAG="$GITHUB_REF_NAME"
664
665 if [ "$DRAFT_RESULT" == "failure" ]; then
666 echo "❌ Draft release creation failed for $TAG: $RUN_URL"
667 else
668 RELEASE_URL=$(gh release view "$TAG" --repo=zed-industries/zed --json url -q '.url')
669 if [ "$UPLOAD_RESULT" == "failure" ]; then
670 echo "❌ Release asset upload failed for $TAG: $RELEASE_URL"
671 elif [ "$UPLOAD_RESULT" == "cancelled" ] || [ "$UPLOAD_RESULT" == "skipped" ]; then
672 FAILED_JOBS=""
673 if [ "$RESULT_RUN_TESTS_MAC" == "failure" ];then FAILED_JOBS="$FAILED_JOBS run_tests_mac"; fi
674 if [ "$RESULT_RUN_TESTS_LINUX" == "failure" ];then FAILED_JOBS="$FAILED_JOBS run_tests_linux"; fi
675 if [ "$RESULT_RUN_TESTS_WINDOWS" == "failure" ];then FAILED_JOBS="$FAILED_JOBS run_tests_windows"; fi
676 if [ "$RESULT_CLIPPY_MAC" == "failure" ];then FAILED_JOBS="$FAILED_JOBS clippy_mac"; fi
677 if [ "$RESULT_CLIPPY_LINUX" == "failure" ];then FAILED_JOBS="$FAILED_JOBS clippy_linux"; fi
678 if [ "$RESULT_CLIPPY_WINDOWS" == "failure" ];then FAILED_JOBS="$FAILED_JOBS clippy_windows"; fi
679 if [ "$RESULT_CHECK_SCRIPTS" == "failure" ];then FAILED_JOBS="$FAILED_JOBS check_scripts"; fi
680 if [ "$RESULT_BUNDLE_LINUX_AARCH64" == "failure" ];then FAILED_JOBS="$FAILED_JOBS bundle_linux_aarch64"; fi
681 if [ "$RESULT_BUNDLE_LINUX_X86_64" == "failure" ];then FAILED_JOBS="$FAILED_JOBS bundle_linux_x86_64"; fi
682 if [ "$RESULT_BUNDLE_MAC_AARCH64" == "failure" ];then FAILED_JOBS="$FAILED_JOBS bundle_mac_aarch64"; fi
683 if [ "$RESULT_BUNDLE_MAC_X86_64" == "failure" ];then FAILED_JOBS="$FAILED_JOBS bundle_mac_x86_64"; fi
684 if [ "$RESULT_BUNDLE_WINDOWS_AARCH64" == "failure" ];then FAILED_JOBS="$FAILED_JOBS bundle_windows_aarch64"; fi
685 if [ "$RESULT_BUNDLE_WINDOWS_X86_64" == "failure" ];then FAILED_JOBS="$FAILED_JOBS bundle_windows_x86_64"; fi
686 FAILED_JOBS=$(echo "$FAILED_JOBS" | xargs)
687 if [ "$UPLOAD_RESULT" == "cancelled" ]; then
688 if [ -n "$FAILED_JOBS" ]; then
689 echo "❌ Release job for $TAG was cancelled, most likely because tests \`$FAILED_JOBS\` failed: $RUN_URL"
690 else
691 echo "❌ Release job for $TAG was cancelled: $RUN_URL"
692 fi
693 else
694 if [ -n "$FAILED_JOBS" ]; then
695 echo "❌ Tests \`$FAILED_JOBS\` for $TAG failed: $RUN_URL"
696 else
697 echo "❌ Tests for $TAG failed: $RUN_URL"
698 fi
699 fi
700 elif [ "$VALIDATE_RESULT" == "failure" ]; then
701 echo "❌ Release asset validation failed for $TAG (missing assets): $RUN_URL"
702 elif [ "$AUTO_RELEASE_RESULT" == "success" ]; then
703 echo "✅ Release $TAG was auto-released successfully: $RELEASE_URL"
704 elif [ "$AUTO_RELEASE_RESULT" == "failure" ]; then
705 echo "❌ Auto release failed for $TAG: $RUN_URL"
706 else
707 echo "👀 Release $TAG sitting freshly baked in the oven and waiting to be published: $RELEASE_URL"
708 fi
709 fi
710 )
711 echo "message=$MESSAGE" >> "$GITHUB_OUTPUT"
712 env:
713 GH_TOKEN: ${{ github.token }}
714 DRAFT_RESULT: ${{ needs.create_draft_release.result }}
715 UPLOAD_RESULT: ${{ needs.upload_release_assets.result }}
716 VALIDATE_RESULT: ${{ needs.validate_release_assets.result }}
717 AUTO_RELEASE_RESULT: ${{ needs.auto_release_preview.result }}
718 RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
719 RESULT_RUN_TESTS_MAC: ${{ needs.run_tests_mac.result }}
720 RESULT_RUN_TESTS_LINUX: ${{ needs.run_tests_linux.result }}
721 RESULT_RUN_TESTS_WINDOWS: ${{ needs.run_tests_windows.result }}
722 RESULT_CLIPPY_MAC: ${{ needs.clippy_mac.result }}
723 RESULT_CLIPPY_LINUX: ${{ needs.clippy_linux.result }}
724 RESULT_CLIPPY_WINDOWS: ${{ needs.clippy_windows.result }}
725 RESULT_CHECK_SCRIPTS: ${{ needs.check_scripts.result }}
726 RESULT_BUNDLE_LINUX_AARCH64: ${{ needs.bundle_linux_aarch64.result }}
727 RESULT_BUNDLE_LINUX_X86_64: ${{ needs.bundle_linux_x86_64.result }}
728 RESULT_BUNDLE_MAC_AARCH64: ${{ needs.bundle_mac_aarch64.result }}
729 RESULT_BUNDLE_MAC_X86_64: ${{ needs.bundle_mac_x86_64.result }}
730 RESULT_BUNDLE_WINDOWS_AARCH64: ${{ needs.bundle_windows_aarch64.result }}
731 RESULT_BUNDLE_WINDOWS_X86_64: ${{ needs.bundle_windows_x86_64.result }}
732 - name: release::send_slack_message
733 run: 'curl -X POST -H ''Content-type: application/json'' --data "$(jq -n --arg text "$SLACK_MESSAGE" ''{"text": $text}'')" "$SLACK_WEBHOOK"'
734 env:
735 SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_WORKFLOW_FAILURES }}
736 SLACK_MESSAGE: ${{ steps.generate-webhook-message.outputs.message }}
737concurrency:
738 group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anysha' }}
739 cancel-in-progress: true
740defaults:
741 run:
742 shell: bash -euxo pipefail {0}