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 name: Check formatting and Clippy lints
19 if: github.repository_owner == 'zed-industries'
20 runs-on:
21 - self-hosted
22 - test
23 steps:
24 - name: Checkout repo
25 uses: actions/checkout@v4
26 with:
27 clean: false
28 submodules: "recursive"
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 name: Run tests
38 if: github.repository_owner == 'zed-industries'
39 runs-on:
40 - self-hosted
41 - test
42 needs: style
43 steps:
44 - name: Checkout repo
45 uses: actions/checkout@v4
46 with:
47 clean: false
48 submodules: "recursive"
49
50 - name: Run tests
51 uses: ./.github/actions/run_tests
52
53 bundle-mac:
54 name: Create a macOS bundle
55 if: github.repository_owner == 'zed-industries'
56 runs-on:
57 - self-hosted
58 - bundle
59 needs: tests
60 env:
61 MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
62 MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
63 APPLE_NOTARIZATION_USERNAME: ${{ secrets.APPLE_NOTARIZATION_USERNAME }}
64 APPLE_NOTARIZATION_PASSWORD: ${{ secrets.APPLE_NOTARIZATION_PASSWORD }}
65 DIGITALOCEAN_SPACES_ACCESS_KEY: ${{ secrets.DIGITALOCEAN_SPACES_ACCESS_KEY }}
66 DIGITALOCEAN_SPACES_SECRET_KEY: ${{ secrets.DIGITALOCEAN_SPACES_SECRET_KEY }}
67 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
68 steps:
69 - name: Install Node
70 uses: actions/setup-node@v4
71 with:
72 node-version: "18"
73
74 - name: Checkout repo
75 uses: actions/checkout@v4
76 with:
77 clean: false
78 submodules: "recursive"
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 name: Create a *.deb Linux bundle
98 if: github.repository_owner == 'zed-industries'
99 runs-on: ubuntu-22.04 # keep the version fixed to avoid libc and dynamic linked library issues
100 needs: tests
101 env:
102 DIGITALOCEAN_SPACES_ACCESS_KEY: ${{ secrets.DIGITALOCEAN_SPACES_ACCESS_KEY }}
103 DIGITALOCEAN_SPACES_SECRET_KEY: ${{ secrets.DIGITALOCEAN_SPACES_SECRET_KEY }}
104 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
105 steps:
106 - name: Checkout repo
107 uses: actions/checkout@v4
108 with:
109 clean: false
110 submodules: "recursive"
111
112 - name: Cache dependencies
113 uses: swatinem/rust-cache@v2
114 with:
115 save-if: ${{ github.ref == 'refs/heads/main' }}
116
117 - name: Configure linux
118 shell: bash -euxo pipefail {0}
119 run: script/linux
120
121 - name: Set release channel to nightly
122 run: |
123 set -euo pipefail
124 version=$(git rev-parse --short HEAD)
125 echo "Publishing version: ${version} on release channel nightly"
126 echo "nightly" > crates/zed/RELEASE_CHANNEL
127
128 # TODO linux : find a way to add licenses to the final bundle
129 # - name: Generate license file
130 # run: script/generate-licenses
131
132 - name: Create Linux *.deb bundle
133 run: script/bundle-linux
134
135 - name: Upload Zed Nightly
136 run: script/upload-nightly linux-deb