-
Notifications
You must be signed in to change notification settings - Fork 7
49 lines (47 loc) · 1.15 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Build Packages
on:
pull_request:
branches:
- main
jobs:
generate_matrix:
name: Find services
runs-on: ubuntu-latest
outputs:
folders: ${{ steps.generate_matrix.outputs.folders }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Generate matrix
id: generate_matrix
shell: bash
run: |
cd ./packages
folders=$(tree -J -d -L 1 | jq -c '.[0].contents | map(.name)')
echo $folders
echo "folders=$folders" >> $GITHUB_OUTPUT
build:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
needs: [ generate_matrix ]
strategy:
matrix:
folder: ${{ fromJson(needs.generate_matrix.outputs.folders) }}
defaults:
run:
working-directory: ./packages/${{ matrix.folder }}
steps:
-
name: Checkout repository
uses: actions/checkout@v3
-
name: Install dependencies
run: yarn install --frozen-lockfile
-
name: Build TypeScript
run: yarn tsc
-
name: Build packages
run: yarn build