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