ci.yml

 1name: CI
 2
 3on:
 4  push:
 5    branches:
 6      - master
 7    tags:
 8      - "v*"
 9  pull_request:
10    branches:
11      - "**"
12
13env:
14  CARGO_TERM_COLOR: always
15  CARGO_INCREMENTAL: 0
16
17jobs:
18  # tests:
19  #   name: Run tests
20  #   runs-on: self-hosted
21  #   steps:
22  #     - name: Install Rust
23  #       uses: actions-rs/toolchain@v1
24  #       with:
25  #         toolchain: stable
26  #         target: x86_64-apple-darwin
27  #         profile: minimal
28
29  #     - name: Checkout repo
30  #       uses: actions/checkout@v2
31
32  #     - name: Run tests
33  #       run: cargo test --no-fail-fast
34
35  bundle:
36    name: Bundle app
37    runs-on: self-hosted
38    steps:
39      - name: Install Rust
40        uses: actions-rs/toolchain@v1
41        with:
42          toolchain: stable
43          target: x86_64-apple-darwin
44          profile: minimal
45
46      - name: Checkout repo
47        uses: actions/checkout@v2
48
49      - name: Create app bundle
50        run: bash ./script/bundle
51
52      - name: Upload app bundle to workflow run
53        uses: actions/upload-artifact@v2
54        with:
55          name: Zed.dmg
56          path: target/release/Zed.dmg
57
58      - uses: svenstaro/upload-release-action@v2
59        name: Upload app bundle to release
60        if: ${{ startsWith(github.github.ref, 'refs/tags/v') }}
61        with:
62          repo_token: ${{ secrets.GITHUB_TOKEN }}
63          file: target/release/Zed.dmg
64          asset_name: Zed.dmg
65          tag: ${{ github.ref }}
66          overwrite: true
67          body: ""