zed/.github/workflows/ci.yml
2021-05-17 21:57:07 -06:00

75 lines
1.6 KiB
YAML

name: CI
on:
push:
branches:
- master
tags:
- "v*"
pull_request:
branches:
- "**"
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
jobs:
tests:
name: Run tests
runs-on: self-hosted
steps:
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: x86_64-apple-darwin
profile: minimal
- name: Checkout repo
uses: actions/checkout@v2
- name: Run tests
run: cargo test --no-fail-fast
bundle:
name: Bundle app
runs-on: self-hosted
steps:
- name: Install Rust x86_64-apple-darwin target
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: x86_64-apple-darwin
profile: minimal
- name: Install Rust aarch64-apple-darwin target
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: aarch64-apple-darwin
profile: minimal
- name: Checkout repo
uses: actions/checkout@v2
- name: Create app bundle
run: script/bundle
- name: Upload app bundle to workflow run
uses: actions/upload-artifact@v2
with:
name: Zed.dmg
path: target/release/Zed.dmg
- uses: svenstaro/upload-release-action@v2
name: Upload app bundle to release
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/Zed.dmg
asset_name: Zed.dmg
tag: ${{ github.ref }}
overwrite: true
body: ""