-
-
Notifications
You must be signed in to change notification settings - Fork 644
80 lines (63 loc) · 1.98 KB
/
windows-build-test.yml
File metadata and controls
80 lines (63 loc) · 1.98 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Test Windows build
on:
pull_request:
branches:
- main
paths:
- 'windows/**'
- '.github/workflows/windows-build-test.yml'
push:
branches:
- main
paths:
- 'windows/**'
- '.github/workflows/windows-build-test.yml'
workflow_dispatch:
jobs:
build:
runs-on: windows-2022
timeout-minutes: 60
concurrency:
group: windows-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create directory for app
run: |
mkdir WindowsExample
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'
cache-dependency-path: |
yarn.lock
WindowsExample/yarn.lock
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2
- name: Install library dependencies
run: yarn
- name: Prepare library
run: yarn prepare
- name: Pack library
run: npm pack
- name: Unpack library files
run: tar -xzf (Get-ChildItem -Path .\*.tgz)
- name: Create Example app
run: npx @react-native-community/cli@latest init WindowsExample
- name: Install app dependencies
working-directory: WindowsExample
run: |
New-Item yarn.lock
yarn add react-native-windows react-native-screens
- name: Init example app
working-directory: WindowsExample
run: npx react-native init-windows --overwrite
- name: Replace react-native-screens files
run: |
Remove-Item -Path ".\WindowsExample\node_modules\react-native-screens\*" -Recurse -Force
Copy-Item -Path ".\package\*" -Destination ".\WindowsExample\node_modules\react-native-screens"
- name: Build app
working-directory: WindowsExample/windows
run: npx react-native run-windows --logging --no-packager --no-deploy --no-autolink