1name: Native Component List app
2
3on:
4  workflow_dispatch: {}
5  pull_request:
6    branches: [master]
7    paths:
8      - .github/workflows/native-component-list.yml
9      - apps/native-component-list/**
10      - yarn.lock
11  push:
12    branches: [master]
13    paths:
14      - .github/workflows/native-component-list.yml
15      - apps/native-component-list/**
16      - yarn.lock
17
18jobs:
19  build:
20    runs-on: ubuntu-18.04
21    steps:
22      - uses: actions/checkout@v2
23        with:
24          submodules: true
25      - uses: actions/setup-node@v2-beta
26        with:
27          node-version: '12'
28      - name: Get yarn cache directory path
29        id: yarn-cache-dir-path
30        run: echo "::set-output name=dir::$(yarn cache dir)"
31      - uses: actions/cache@v2
32        with:
33          path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
34          key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
35          restore-keys: |
36            ${{ runner.os }}-yarn-
37      - run: yarn install --frozen-lockfile
38      - run: yarn tsc
39        working-directory: apps/native-component-list
40      - run: yarn lint --max-warnings 0
41        working-directory: apps/native-component-list
42      - name: �� Notify on Slack
43        uses: 8398a7/action-slack@v3
44        if: failure() && (github.event.ref == 'refs/heads/master')
45        env:
46          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47          SLACK_WEBHOOK_URL: ${{ secrets.slack_webhook_api }}
48        with:
49          channel: '#api'
50          status: ${{ job.status }}
51          fields: job,commit,ref,eventName,author,took
52          author_name: Build Native Component List
53