Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CI Docs #942

Merged
merged 2 commits into from
Jun 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 19 additions & 15 deletions docs/setup-ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down
Loading