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 Node
64              uses: actions/setup-node@v3
65              with:
66                  node-version: "18"
67
68            - name: Checkout repo
69              uses: actions/checkout@v3
70              with:
71                  clean: false
72                  submodules: "recursive"
73
74            - name: Limit target directory size
75              run: script/clear-target-dir-if-larger-than 100
76
77            - name: Set release channel to nightly
78              run: |
79                  set -eu
80                  version=$(git rev-parse --short HEAD)
81                  echo "Publishing version: ${version} on release channel nightly"
82                  echo "nightly" > crates/zed/RELEASE_CHANNEL
83
84            - name: Generate license file
85              run: script/generate-licenses
86
87            - name: Create app bundle
88              run: script/bundle
89
90            - name: Upload Zed Nightly
91              run: script/upload-nightly