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