release_nightly.yml

 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        runs-on:
20            - self-hosted
21            - test
22        steps:
23            - name: Checkout repo
24              uses: actions/checkout@v3
25              with:
26                  clean: false
27                  submodules: "recursive"
28                  fetch-depth: 0
29
30            - name: Run style checks
31              uses: ./.github/actions/check_style
32
33    tests:
34        name: Run tests
35        runs-on:
36            - self-hosted
37            - test
38        needs: style
39        steps:
40            - name: Checkout repo
41              uses: actions/checkout@v3
42              with:
43                  clean: false
44                  submodules: "recursive"
45
46            - name: Run tests
47              uses: ./.github/actions/run_tests
48
49    bundle:
50        name: Bundle app
51        runs-on:
52            - self-hosted
53            - bundle
54        needs: tests
55        env:
56            MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
57            MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
58            APPLE_NOTARIZATION_USERNAME: ${{ secrets.APPLE_NOTARIZATION_USERNAME }}
59            APPLE_NOTARIZATION_PASSWORD: ${{ secrets.APPLE_NOTARIZATION_PASSWORD }}
60            DIGITALOCEAN_SPACES_ACCESS_KEY: ${{ secrets.DIGITALOCEAN_SPACES_ACCESS_KEY }}
61            DIGITALOCEAN_SPACES_SECRET_KEY: ${{ secrets.DIGITALOCEAN_SPACES_SECRET_KEY }}
62        steps:
63            - name: Install Rust
64              run: |
65                  rustup set profile minimal
66                  rustup update stable
67                  rustup target add aarch64-apple-darwin
68                  rustup target add x86_64-apple-darwin
69                  rustup target add wasm32-wasi
70
71            - name: Install Node
72              uses: actions/setup-node@v3
73              with:
74                  node-version: "18"
75
76            - name: Checkout repo
77              uses: actions/checkout@v3
78              with:
79                  clean: false
80                  submodules: "recursive"
81
82            - name: Limit target directory size
83              run: script/clear-target-dir-if-larger-than 100
84
85            - name: Set release channel to nightly
86              run: |
87                  set -eu
88                  version=$(git rev-parse --short HEAD)
89                  echo "Publishing version: ${version} on release channel nightly"
90                  echo "nightly" > crates/zed/RELEASE_CHANNEL
91
92            - name: Generate license file
93              run: script/generate-licenses
94
95            - name: Create app bundle
96              run: script/bundle
97
98            - name: Upload Zed Nightly
99              run: script/upload-nightly