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