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