name: CI

on:
  push:
    branches: [master]
  pull_request:
    branches: [master]

jobs:
  build:
    runs-on: macos-11
    steps:
      - uses: actions/checkout@v2

      - name: xcodebuild
        uses: sersoft-gmbh/xcodebuild-action@v1.4
        with:
          project: MonitorControl.xcodeproj
          scheme: MonitorControl
          destination: platform=macOS
          action: build
  lint:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: SwiftLint
        uses: norio-nomura/action-swiftlint@3.2.1
        env:
          DIFF_BASE: ${{ github.base_ref }}
        with:
          args: --strict

