1name: Release Nightly
2
3on:
4 schedule:
5 # Fire every day at 7:00am UTC (Roughly before EU workday and after US workday)
6 - cron: "0 7 * * *"
7 push:
8 tags:
9 - "nightly"
10
11env:
12 CARGO_TERM_COLOR: always
13 CARGO_INCREMENTAL: 0
14 RUST_BACKTRACE: 1
15
16jobs:
17 style:
18 timeout-minutes: 60
19 name: Check formatting and Clippy lints
20 if: github.repository_owner == 'zed-industries'
21 runs-on:
22 - self-hosted
23 - test
24 steps:
25 - name: Checkout repo
26 uses: actions/checkout@v4
27 with:
28 clean: false
29 fetch-depth: 0
30
31 - name: Run style checks
32 uses: ./.github/actions/check_style
33
34 - name: Run clippy
35 run: cargo xtask clippy
36 tests:
37 timeout-minutes: 60
38 name: Run tests
39 if: github.repository_owner == 'zed-industries'
40 runs-on:
41 - self-hosted
42 - test
43 needs: style
44 steps:
45 - name: Checkout repo
46 uses: actions/checkout@v4
47 with:
48 clean: false
49
50 - name: Run tests
51 uses: ./.github/actions/run_tests
52
53 bundle-mac:
54 timeout-minutes: 60
55 name: Create a macOS bundle
56 if: github.repository_owner == 'zed-industries'
57 runs-on:
58 - self-hosted
59 - bundle
60 needs: tests
61 env:
62 MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
63 MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
64 APPLE_NOTARIZATION_USERNAME: ${{ secrets.APPLE_NOTARIZATION_USERNAME }}
65 APPLE_NOTARIZATION_PASSWORD: ${{ secrets.APPLE_NOTARIZATION_PASSWORD }}
66 DIGITALOCEAN_SPACES_ACCESS_KEY: ${{ secrets.DIGITALOCEAN_SPACES_ACCESS_KEY }}
67 DIGITALOCEAN_SPACES_SECRET_KEY: ${{ secrets.DIGITALOCEAN_SPACES_SECRET_KEY }}
68 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
69 steps:
70 - name: Install Node
71 uses: actions/setup-node@v4
72 with:
73 node-version: "18"
74
75 - name: Checkout repo
76 uses: actions/checkout@v4
77 with:
78 clean: false
79
80 - name: Set release channel to nightly
81 run: |
82 set -eu
83 version=$(git rev-parse --short HEAD)
84 echo "Publishing version: ${version} on release channel nightly"
85 echo "nightly" > crates/zed/RELEASE_CHANNEL
86
87 - name: Generate license file
88 run: script/generate-licenses
89
90 - name: Create macOS app bundle
91 run: script/bundle-mac
92
93 - name: Upload Zed Nightly
94 run: script/upload-nightly macos
95
96 bundle-deb:
97 timeout-minutes: 60
98 name: Create a Linux *.tar.gz bundle
99 if: github.repository_owner == 'zed-industries'
100 runs-on:
101 - self-hosted
102 - deploy
103 needs: tests
104 env:
105 DIGITALOCEAN_SPACES_ACCESS_KEY: ${{ secrets.DIGITALOCEAN_SPACES_ACCESS_KEY }}
106 DIGITALOCEAN_SPACES_SECRET_KEY: ${{ secrets.DIGITALOCEAN_SPACES_SECRET_KEY }}
107 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
108 steps:
109 - name: Checkout repo
110 uses: actions/checkout@v4
111 with:
112 clean: false
113
114 - name: Add Rust to the PATH
115 run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
116
117 - name: Set release channel to nightly
118 run: |
119 set -euo pipefail
120 version=$(git rev-parse --short HEAD)
121 echo "Publishing version: ${version} on release channel nightly"
122 echo "nightly" > crates/zed/RELEASE_CHANNEL
123
124 - name: Generate license file
125 run: script/generate-licenses
126
127 - name: Create Linux .tar.gz bundle
128 run: script/bundle-linux
129
130 - name: Upload Zed Nightly
131 run: script/upload-nightly linux-targz