-
Notifications
You must be signed in to change notification settings - Fork 4
63 lines (59 loc) · 1.76 KB
/
lint-and-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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Lint and Build (PR)
env:
NX_BRANCH: ${{ github.event.number || github.ref_name }}
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
on:
push:
branches: ['master']
pull_request:
branches: ['master']
jobs:
lint:
name: Lint affected projects
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: lts/*
cache: 'yarn'
- uses: nrwl/nx-set-shas@v2
with:
main-branch-name: 'master'
- name: yarn install
run: yarn --immutable
- name: Lint affected
run: yarn nx affected:lint
build:
name: Build affected projects
needs: lint
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: lts/*
cache: 'yarn'
- uses: nrwl/nx-set-shas@v2
with:
main-branch-name: 'master'
- name: Xcode Select Version
# see available xcode versions in https://github.com/actions/runner-images/blob/main/images/macos/macos-14-arm64-Readme.md#xcode
uses: mobiledevops/xcode-select-version-action@v1
with:
xcode-select-version: 15.4
- name: Install visionOS platform
run: |
defaults write com.apple.dt.Xcode AllowUnsupportedVisionOSHost -bool YES
defaults write com.apple.CoreSimulator AllowUnsupportedVisionOSHost -bool YES
xcodebuild -downloadPlatform visionOS
- name: yarn install
run: yarn --immutable
- name: Build.all affected
run: yarn nx affected --target=build.all