release.yml

  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: self-mini-macos
 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::setup_node
 26      uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
 27      with:
 28        node-version: '20'
 29    - name: steps::clippy
 30      run: ./script/clippy
 31      shell: bash -euxo pipefail {0}
 32    - name: steps::clear_target_dir_if_large
 33      run: ./script/clear-target-dir-if-larger-than 300
 34      shell: bash -euxo pipefail {0}
 35    - name: steps::cargo_nextest
 36      run: cargo nextest run --workspace --no-fail-fast
 37      shell: bash -euxo pipefail {0}
 38    - name: steps::cleanup_cargo_config
 39      if: always()
 40      run: |
 41        rm -rf ./../.cargo
 42      shell: bash -euxo pipefail {0}
 43    timeout-minutes: 60
 44  run_tests_linux:
 45    if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
 46    runs-on: namespace-profile-16x32-ubuntu-2204
 47    steps:
 48    - name: steps::checkout_repo
 49      uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
 50      with:
 51        clean: false
 52    - name: steps::setup_cargo_config
 53      run: |
 54        mkdir -p ./../.cargo
 55        cp ./.cargo/ci-config.toml ./../.cargo/config.toml
 56      shell: bash -euxo pipefail {0}
 57    - name: steps::cache_rust_dependencies_namespace
 58      uses: namespacelabs/nscloud-cache-action@v1
 59      with:
 60        cache: rust
 61    - name: steps::setup_linux
 62      run: ./script/linux
 63      shell: bash -euxo pipefail {0}
 64    - name: steps::install_mold
 65      run: ./script/install-mold
 66      shell: bash -euxo pipefail {0}
 67    - name: steps::download_wasi_sdk
 68      run: ./script/download-wasi-sdk
 69      shell: bash -euxo pipefail {0}
 70    - name: steps::setup_node
 71      uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
 72      with:
 73        node-version: '20'
 74    - name: steps::clippy
 75      run: ./script/clippy
 76      shell: bash -euxo pipefail {0}
 77    - name: steps::trigger_autofix
 78      if: failure() && github.event_name == 'pull_request' && github.actor != 'zed-zippy[bot]'
 79      run: gh workflow run autofix_pr.yml -f pr_number=${{ github.event.pull_request.number }} -f run_clippy=true
 80      shell: bash -euxo pipefail {0}
 81      env:
 82        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
 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      shell: bash -euxo pipefail {0}
 88    - name: steps::cargo_nextest
 89      run: cargo nextest run --workspace --no-fail-fast
 90      shell: bash -euxo pipefail {0}
 91    - name: steps::cleanup_cargo_config
 92      if: always()
 93      run: |
 94        rm -rf ./../.cargo
 95      shell: bash -euxo pipefail {0}
 96    timeout-minutes: 60
 97  run_tests_windows:
 98    if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
 99    runs-on: self-32vcpu-windows-2022
100    steps:
101    - name: steps::checkout_repo
102      uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
103      with:
104        clean: false
105    - name: steps::setup_cargo_config
106      run: |
107        New-Item -ItemType Directory -Path "./../.cargo" -Force
108        Copy-Item -Path "./.cargo/ci-config.toml" -Destination "./../.cargo/config.toml"
109      shell: pwsh
110    - name: steps::setup_node
111      uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
112      with:
113        node-version: '20'
114    - name: steps::clippy
115      run: ./script/clippy.ps1
116      shell: pwsh
117    - name: steps::clear_target_dir_if_large
118      run: ./script/clear-target-dir-if-larger-than.ps1 250
119      shell: pwsh
120    - name: steps::cargo_nextest
121      run: cargo nextest run --workspace --no-fail-fast
122      shell: pwsh
123    - name: steps::cleanup_cargo_config
124      if: always()
125      run: |
126        Remove-Item -Recurse -Path "./../.cargo" -Force -ErrorAction SilentlyContinue
127      shell: pwsh
128    timeout-minutes: 60
129  check_scripts:
130    if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
131    runs-on: namespace-profile-2x4-ubuntu-2404
132    steps:
133    - name: steps::checkout_repo
134      uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
135      with:
136        clean: false
137    - name: run_tests::check_scripts::run_shellcheck
138      run: ./script/shellcheck-scripts error
139      shell: bash -euxo pipefail {0}
140    - id: get_actionlint
141      name: run_tests::check_scripts::download_actionlint
142      run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
143      shell: bash -euxo pipefail {0}
144    - name: run_tests::check_scripts::run_actionlint
145      run: |
146        ${{ steps.get_actionlint.outputs.executable }} -color
147      shell: bash -euxo pipefail {0}
148    - name: run_tests::check_scripts::check_xtask_workflows
149      run: |
150        cargo xtask workflows
151        if ! git diff --exit-code .github; then
152          echo "Error: .github directory has uncommitted changes after running 'cargo xtask workflows'"
153          echo "Please run 'cargo xtask workflows' locally and commit the changes"
154          exit 1
155        fi
156      shell: bash -euxo pipefail {0}
157    timeout-minutes: 60
158  create_draft_release:
159    if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
160    runs-on: namespace-profile-2x4-ubuntu-2404
161    steps:
162    - name: steps::checkout_repo
163      uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
164      with:
165        clean: false
166        fetch-depth: 25
167        ref: ${{ github.ref }}
168    - name: script/determine-release-channel
169      run: script/determine-release-channel
170      shell: bash -euxo pipefail {0}
171    - name: mkdir -p target/
172      run: mkdir -p target/
173      shell: bash -euxo pipefail {0}
174    - name: release::create_draft_release::generate_release_notes
175      run: node --redirect-warnings=/dev/null ./script/draft-release-notes "$RELEASE_VERSION" "$RELEASE_CHANNEL" > target/release-notes.md
176      shell: bash -euxo pipefail {0}
177    - name: release::create_draft_release::create_release
178      run: script/create-draft-release target/release-notes.md
179      shell: bash -euxo pipefail {0}
180      env:
181        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
182    timeout-minutes: 60
183  bundle_linux_aarch64:
184    needs:
185    - run_tests_linux
186    - check_scripts
187    runs-on: namespace-profile-8x32-ubuntu-2004-arm-m4
188    env:
189      CARGO_INCREMENTAL: 0
190      ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
191      ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
192    steps:
193    - name: steps::checkout_repo
194      uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
195      with:
196        clean: false
197    - name: steps::setup_sentry
198      uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
199      with:
200        token: ${{ secrets.SENTRY_AUTH_TOKEN }}
201    - name: steps::setup_linux
202      run: ./script/linux
203      shell: bash -euxo pipefail {0}
204    - name: steps::install_mold
205      run: ./script/install-mold
206      shell: bash -euxo pipefail {0}
207    - name: steps::download_wasi_sdk
208      run: ./script/download-wasi-sdk
209      shell: bash -euxo pipefail {0}
210    - name: ./script/bundle-linux
211      run: ./script/bundle-linux
212      shell: bash -euxo pipefail {0}
213    - name: '@actions/upload-artifact zed-linux-aarch64.tar.gz'
214      uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
215      with:
216        name: zed-linux-aarch64.tar.gz
217        path: target/release/zed-linux-aarch64.tar.gz
218        if-no-files-found: error
219    - name: '@actions/upload-artifact zed-remote-server-linux-aarch64.gz'
220      uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
221      with:
222        name: zed-remote-server-linux-aarch64.gz
223        path: target/zed-remote-server-linux-aarch64.gz
224        if-no-files-found: error
225    timeout-minutes: 60
226  bundle_linux_x86_64:
227    needs:
228    - run_tests_linux
229    - check_scripts
230    runs-on: namespace-profile-32x64-ubuntu-2004
231    env:
232      CARGO_INCREMENTAL: 0
233      ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
234      ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
235    steps:
236    - name: steps::checkout_repo
237      uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
238      with:
239        clean: false
240    - name: steps::setup_sentry
241      uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
242      with:
243        token: ${{ secrets.SENTRY_AUTH_TOKEN }}
244    - name: steps::setup_linux
245      run: ./script/linux
246      shell: bash -euxo pipefail {0}
247    - name: steps::install_mold
248      run: ./script/install-mold
249      shell: bash -euxo pipefail {0}
250    - name: steps::download_wasi_sdk
251      run: ./script/download-wasi-sdk
252      shell: bash -euxo pipefail {0}
253    - name: ./script/bundle-linux
254      run: ./script/bundle-linux
255      shell: bash -euxo pipefail {0}
256    - name: '@actions/upload-artifact zed-linux-x86_64.tar.gz'
257      uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
258      with:
259        name: zed-linux-x86_64.tar.gz
260        path: target/release/zed-linux-x86_64.tar.gz
261        if-no-files-found: error
262    - name: '@actions/upload-artifact zed-remote-server-linux-x86_64.gz'
263      uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
264      with:
265        name: zed-remote-server-linux-x86_64.gz
266        path: target/zed-remote-server-linux-x86_64.gz
267        if-no-files-found: error
268    timeout-minutes: 60
269  bundle_mac_aarch64:
270    needs:
271    - run_tests_mac
272    - check_scripts
273    runs-on: self-mini-macos
274    env:
275      CARGO_INCREMENTAL: 0
276      ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
277      ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
278      MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
279      MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
280      APPLE_NOTARIZATION_KEY: ${{ secrets.APPLE_NOTARIZATION_KEY }}
281      APPLE_NOTARIZATION_KEY_ID: ${{ secrets.APPLE_NOTARIZATION_KEY_ID }}
282      APPLE_NOTARIZATION_ISSUER_ID: ${{ secrets.APPLE_NOTARIZATION_ISSUER_ID }}
283    steps:
284    - name: steps::checkout_repo
285      uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
286      with:
287        clean: false
288    - name: steps::setup_node
289      uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
290      with:
291        node-version: '20'
292    - name: steps::setup_sentry
293      uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
294      with:
295        token: ${{ secrets.SENTRY_AUTH_TOKEN }}
296    - name: steps::clear_target_dir_if_large
297      run: ./script/clear-target-dir-if-larger-than 300
298      shell: bash -euxo pipefail {0}
299    - name: run_bundling::bundle_mac::bundle_mac
300      run: ./script/bundle-mac aarch64-apple-darwin
301      shell: bash -euxo pipefail {0}
302    - name: '@actions/upload-artifact Zed-aarch64.dmg'
303      uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
304      with:
305        name: Zed-aarch64.dmg
306        path: target/aarch64-apple-darwin/release/Zed-aarch64.dmg
307        if-no-files-found: error
308    - name: '@actions/upload-artifact zed-remote-server-macos-aarch64.gz'
309      uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
310      with:
311        name: zed-remote-server-macos-aarch64.gz
312        path: target/zed-remote-server-macos-aarch64.gz
313        if-no-files-found: error
314    timeout-minutes: 60
315  bundle_mac_x86_64:
316    needs:
317    - run_tests_mac
318    - check_scripts
319    runs-on: self-mini-macos
320    env:
321      CARGO_INCREMENTAL: 0
322      ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
323      ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
324      MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
325      MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
326      APPLE_NOTARIZATION_KEY: ${{ secrets.APPLE_NOTARIZATION_KEY }}
327      APPLE_NOTARIZATION_KEY_ID: ${{ secrets.APPLE_NOTARIZATION_KEY_ID }}
328      APPLE_NOTARIZATION_ISSUER_ID: ${{ secrets.APPLE_NOTARIZATION_ISSUER_ID }}
329    steps:
330    - name: steps::checkout_repo
331      uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
332      with:
333        clean: false
334    - name: steps::setup_node
335      uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
336      with:
337        node-version: '20'
338    - name: steps::setup_sentry
339      uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
340      with:
341        token: ${{ secrets.SENTRY_AUTH_TOKEN }}
342    - name: steps::clear_target_dir_if_large
343      run: ./script/clear-target-dir-if-larger-than 300
344      shell: bash -euxo pipefail {0}
345    - name: run_bundling::bundle_mac::bundle_mac
346      run: ./script/bundle-mac x86_64-apple-darwin
347      shell: bash -euxo pipefail {0}
348    - name: '@actions/upload-artifact Zed-x86_64.dmg'
349      uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
350      with:
351        name: Zed-x86_64.dmg
352        path: target/x86_64-apple-darwin/release/Zed-x86_64.dmg
353        if-no-files-found: error
354    - name: '@actions/upload-artifact zed-remote-server-macos-x86_64.gz'
355      uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
356      with:
357        name: zed-remote-server-macos-x86_64.gz
358        path: target/zed-remote-server-macos-x86_64.gz
359        if-no-files-found: error
360    timeout-minutes: 60
361  bundle_windows_aarch64:
362    needs:
363    - run_tests_windows
364    - check_scripts
365    runs-on: self-32vcpu-windows-2022
366    env:
367      CARGO_INCREMENTAL: 0
368      ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
369      ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
370      AZURE_TENANT_ID: ${{ secrets.AZURE_SIGNING_TENANT_ID }}
371      AZURE_CLIENT_ID: ${{ secrets.AZURE_SIGNING_CLIENT_ID }}
372      AZURE_CLIENT_SECRET: ${{ secrets.AZURE_SIGNING_CLIENT_SECRET }}
373      ACCOUNT_NAME: ${{ vars.AZURE_SIGNING_ACCOUNT_NAME }}
374      CERT_PROFILE_NAME: ${{ vars.AZURE_SIGNING_CERT_PROFILE_NAME }}
375      ENDPOINT: ${{ vars.AZURE_SIGNING_ENDPOINT }}
376      FILE_DIGEST: SHA256
377      TIMESTAMP_DIGEST: SHA256
378      TIMESTAMP_SERVER: http://timestamp.acs.microsoft.com
379    steps:
380    - name: steps::checkout_repo
381      uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
382      with:
383        clean: false
384    - name: steps::setup_sentry
385      uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
386      with:
387        token: ${{ secrets.SENTRY_AUTH_TOKEN }}
388    - name: run_bundling::bundle_windows::bundle_windows
389      run: script/bundle-windows.ps1 -Architecture aarch64
390      shell: pwsh
391      working-directory: ${{ env.ZED_WORKSPACE }}
392    - name: '@actions/upload-artifact Zed-aarch64.exe'
393      uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
394      with:
395        name: Zed-aarch64.exe
396        path: target/Zed-aarch64.exe
397        if-no-files-found: error
398    timeout-minutes: 60
399  bundle_windows_x86_64:
400    needs:
401    - run_tests_windows
402    - check_scripts
403    runs-on: self-32vcpu-windows-2022
404    env:
405      CARGO_INCREMENTAL: 0
406      ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
407      ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
408      AZURE_TENANT_ID: ${{ secrets.AZURE_SIGNING_TENANT_ID }}
409      AZURE_CLIENT_ID: ${{ secrets.AZURE_SIGNING_CLIENT_ID }}
410      AZURE_CLIENT_SECRET: ${{ secrets.AZURE_SIGNING_CLIENT_SECRET }}
411      ACCOUNT_NAME: ${{ vars.AZURE_SIGNING_ACCOUNT_NAME }}
412      CERT_PROFILE_NAME: ${{ vars.AZURE_SIGNING_CERT_PROFILE_NAME }}
413      ENDPOINT: ${{ vars.AZURE_SIGNING_ENDPOINT }}
414      FILE_DIGEST: SHA256
415      TIMESTAMP_DIGEST: SHA256
416      TIMESTAMP_SERVER: http://timestamp.acs.microsoft.com
417    steps:
418    - name: steps::checkout_repo
419      uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
420      with:
421        clean: false
422    - name: steps::setup_sentry
423      uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
424      with:
425        token: ${{ secrets.SENTRY_AUTH_TOKEN }}
426    - name: run_bundling::bundle_windows::bundle_windows
427      run: script/bundle-windows.ps1 -Architecture x86_64
428      shell: pwsh
429      working-directory: ${{ env.ZED_WORKSPACE }}
430    - name: '@actions/upload-artifact Zed-x86_64.exe'
431      uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
432      with:
433        name: Zed-x86_64.exe
434        path: target/Zed-x86_64.exe
435        if-no-files-found: error
436    timeout-minutes: 60
437  upload_release_assets:
438    needs:
439    - create_draft_release
440    - bundle_linux_aarch64
441    - bundle_linux_x86_64
442    - bundle_mac_aarch64
443    - bundle_mac_x86_64
444    - bundle_windows_aarch64
445    - bundle_windows_x86_64
446    runs-on: namespace-profile-4x8-ubuntu-2204
447    steps:
448    - name: release::download_workflow_artifacts
449      uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53
450      with:
451        path: ./artifacts/
452    - name: ls -lR ./artifacts
453      run: ls -lR ./artifacts
454      shell: bash -euxo pipefail {0}
455    - name: release::prep_release_artifacts
456      run: |-
457        mkdir -p release-artifacts/
458
459        mv ./artifacts/Zed-aarch64.dmg/Zed-aarch64.dmg release-artifacts/Zed-aarch64.dmg
460        mv ./artifacts/Zed-x86_64.dmg/Zed-x86_64.dmg release-artifacts/Zed-x86_64.dmg
461        mv ./artifacts/zed-linux-aarch64.tar.gz/zed-linux-aarch64.tar.gz release-artifacts/zed-linux-aarch64.tar.gz
462        mv ./artifacts/zed-linux-x86_64.tar.gz/zed-linux-x86_64.tar.gz release-artifacts/zed-linux-x86_64.tar.gz
463        mv ./artifacts/Zed-x86_64.exe/Zed-x86_64.exe release-artifacts/Zed-x86_64.exe
464        mv ./artifacts/Zed-aarch64.exe/Zed-aarch64.exe release-artifacts/Zed-aarch64.exe
465        mv ./artifacts/zed-remote-server-macos-aarch64.gz/zed-remote-server-macos-aarch64.gz release-artifacts/zed-remote-server-macos-aarch64.gz
466        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
467        mv ./artifacts/zed-remote-server-linux-aarch64.gz/zed-remote-server-linux-aarch64.gz release-artifacts/zed-remote-server-linux-aarch64.gz
468        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
469      shell: bash -euxo pipefail {0}
470    - name: gh release upload "$GITHUB_REF_NAME" --repo=zed-industries/zed release-artifacts/*
471      run: gh release upload "$GITHUB_REF_NAME" --repo=zed-industries/zed release-artifacts/*
472      shell: bash -euxo pipefail {0}
473      env:
474        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
475  auto_release_preview:
476    needs:
477    - upload_release_assets
478    if: startsWith(github.ref, 'refs/tags/v') && endsWith(github.ref, '-pre') && !endsWith(github.ref, '.0-pre')
479    runs-on: namespace-profile-2x4-ubuntu-2404
480    steps:
481    - id: get-app-token
482      name: steps::authenticate_as_zippy
483      uses: actions/create-github-app-token@bef1eaf1c0ac2b148ee2a0a74c65fbe6db0631f1
484      with:
485        app-id: ${{ secrets.ZED_ZIPPY_APP_ID }}
486        private-key: ${{ secrets.ZED_ZIPPY_APP_PRIVATE_KEY }}
487    - name: gh release edit "$GITHUB_REF_NAME" --repo=zed-industries/zed --draft=false
488      run: gh release edit "$GITHUB_REF_NAME" --repo=zed-industries/zed --draft=false
489      shell: bash -euxo pipefail {0}
490      env:
491        GITHUB_TOKEN: ${{ steps.get-app-token.outputs.token }}
492  notify_on_failure:
493    needs:
494    - upload_release_assets
495    - auto_release_preview
496    if: failure()
497    runs-on: namespace-profile-2x4-ubuntu-2404
498    steps:
499    - name: release::notify_on_failure::notify_slack
500      run: |-
501        curl -X POST -H 'Content-type: application/json'\
502         --data '{"text":"${{ github.workflow }} failed:  ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"}' "$SLACK_WEBHOOK"
503      shell: bash -euxo pipefail {0}
504      env:
505        SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_WORKFLOW_FAILURES }}
506concurrency:
507  group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anysha' }}
508  cancel-in-progress: true