diff --git a/docs/setup-ci.md b/docs/setup-ci.md index 86a436ee2..cd0ab4ded 100644 --- a/docs/setup-ci.md +++ b/docs/setup-ci.md @@ -14,31 +14,35 @@ The VM images supported by GitHub Actions CI/CD can be found [here](https://gith Next you need to create a YAML file for GitHub Actions, the basic steps are: - Checkout code and setup the environment ```yaml - - uses: actions/checkout@v2 - name: Checkout Code + name: Windows CI + on: [pull_request] - - name: Setup Node.js - uses: actions/setup-node@v1 - with: - node-version: '14' + jobs: + run-windows-tests: + name: Build & run tests + runs-on: windows-2022 - - name: Setup MSBuild - uses: microsoft/setup-msbuild@v1.0.2 - with: - vs-version: 16.8 + steps: + - uses: actions/checkout@v2 + name: Checkout Code - - name: Install node modules - run: yarn --frozen-lockfile + - name: Setup Node.js + uses: actions/setup-node@v1 + with: + node-version: '^18' - - name: yarn build - run: yarn build + - name: Setup MSBuild + uses: microsoft/setup-msbuild@v2 + + - name: Install node modules + run: yarn --frozen-lockfile ``` - Build and run the project ```yaml - name: Run Windows x64 release run: npx react-native run-windows --arch x64 --release --logging ``` -Check out the full [`react-native-webview` example](https://github.com/react-native-webview/react-native-webview/blob/v11.17.2/.github/workflows/windows-ci.yml) as well as their [official example](https://github.blog/2019-08-08-github-actions-now-supports-ci-cd/) for more info. +Check out the full [`react-native-webview` example](https://github.com/react-native-webview/react-native-webview/blob/master/.github/workflows/windows-ci.yml) as well as their [official example](https://github.blog/2019-08-08-github-actions-now-supports-ci-cd/) for more info. Save the YAML file to `.github\workflows\` and then commit. To learn more about YAML syntax, see [Workflow syntax for GitHub Actions](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions).