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    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: ./script/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-linux:
 97    strategy:
 98      matrix:
 99        machine: [deploy, hosted-linux-arm-1]
100    timeout-minutes: 60
101    name: Create a Linux *.tar.gz bundle
102    if: github.repository_owner == 'zed-industries'
103    runs-on:
104      - ${{ matrix.machine }}
105    needs: tests
106    env:
107      DIGITALOCEAN_SPACES_ACCESS_KEY: ${{ secrets.DIGITALOCEAN_SPACES_ACCESS_KEY }}
108      DIGITALOCEAN_SPACES_SECRET_KEY: ${{ secrets.DIGITALOCEAN_SPACES_SECRET_KEY }}
109      ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
110    steps:
111      - name: Checkout repo
112        uses: actions/checkout@v4
113        with:
114          clean: false
115
116      - name: Add Rust to the PATH
117        run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
118
119      - name: Set release channel to nightly
120        run: |
121          set -euo pipefail
122          version=$(git rev-parse --short HEAD)
123          echo "Publishing version: ${version} on release channel nightly"
124          echo "nightly" > crates/zed/RELEASE_CHANNEL
125
126      - name: Create Linux .tar.gz bundle
127        run: script/bundle-linux
128
129      - name: Upload Zed Nightly
130        run: script/upload-nightly linux-targz