3
0
Fork 0
mirror of https://gitea.com/actions/setup-node.git synced 2024-11-22 01:59:32 +01:00

Add Architecture only example

This commit is contained in:
Amin Yahyaabadi 2020-12-08 16:47:34 -06:00
parent 5984462aaa
commit 2bbfc7698a

View file

@ -74,9 +74,28 @@ jobs:
- run: npm test
```
Operating Systems and Architecture:
Architecture:
You can use any of the [supported operating systems](https://docs.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners), and the compatible `architecture` can be selected using `architecture`. Values are `x86`, `x64`, `arm64`, `armv6l`, `armv7l`, `ppc64le`, `s390x` (not all of the architectures are available on all platforms).
When using `architecture`, `node-version` must be provided as well.
```yaml
jobs:
build:
runs-on: windows-latest
name: Node sample
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '12'
architecture: 'x64' # optional, x64 or x86. If not specified, x64 will be used by default
- run: npm install
- run: npm test
```
Multiple Operating Systems and Architectures:
You can use any of the [supported operating systems](https://docs.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners). The architecture can be selected using `node-arch`. Values are `x86`, `x64`, `arm64`, `armv6l`, `armv7l`, `ppc64le`, `s390x` (not all of the architectures are available on all platforms).
```yaml
jobs:
build: