Skip to content

Commit

Permalink
moved node version section in README to advanced usage
Browse files Browse the repository at this point in the history
added link to README
* migrated contents of version-file-workflow.yml to versions.yml
* further refactored parseNodeVersionFile() & tests
* removed type annotations in catch ()
  • Loading branch information
Xlient committed Oct 5, 2021
1 parent e471f47 commit b1ed0c3
Show file tree
Hide file tree
Showing 8 changed files with 113 additions and 17,531 deletions.
33 changes: 0 additions & 33 deletions .github/workflows/version-file-workflow.yml

This file was deleted.

11 changes: 11 additions & 0 deletions .github/workflows/versions.yml
Expand Up @@ -78,6 +78,17 @@ jobs:
run: __tests__/verify-node.sh "${{ matrix.node-version }}"
shell: bash

version-file:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v2
- name: Setup node test
uses: ./
with:
node-version-file: '.nvmrc'
node-dist:
runs-on: ${{ matrix.os }}
strategy:
Expand Down
27 changes: 7 additions & 20 deletions README.md
Expand Up @@ -71,20 +71,6 @@ steps:
- run: npm test
```

**Node version file:**

The `node-version-file` input allows you to use a file within your repository which contains the version of node your project uses for example `.nvmrc`. If both the `node-version` and the `node-version-file` inputs are provided the `node-version` input is used.
> The node version file is read from the project root
```yaml
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version-file: '.nvmrc'
- run: npm install
- run: npm test
```

## Matrix Testing:
```yaml
Expand All @@ -107,12 +93,13 @@ jobs:
## Advanced usage

1. [Check latest version](docs/advanced-usage.md#check-latest-version)
2. [Using different architectures](docs/advanced-usage.md#architecture)
3. [Caching packages dependencies](docs/advanced-usage.md#caching-packages-dependencies)
4. [Using multiple operating systems and architectures](docs/advanced-usage.md#multiple-operating-systems-and-architectures)
5. [Publishing to npmjs and GPR with npm](docs/advanced-usage.md#publish-to-npmjs-and-gpr-with-npm)
6. [Publishing to npmjs and GPR with yarn](docs/advanced-usage.md#publish-to-npmjs-and-gpr-with-yarn)
7. [Using private packages](docs/advanced-usage.md#use-private-packages)
2. [Using a node version file](docs/advanced-usage.md#Node-version-file)
3. [Using different architectures](docs/advanced-usage.md#architecture)
4. [Caching packages dependencies](docs/advanced-usage.md#caching-packages-dependencies)
5. [Using multiple operating systems and architectures](docs/advanced-usage.md#multiple-operating-systems-and-architectures)
6. [Publishing to npmjs and GPR with npm](docs/advanced-usage.md#publish-to-npmjs-and-gpr-with-npm)
7. [Publishing to npmjs and GPR with yarn](docs/advanced-usage.md#publish-to-npmjs-and-gpr-with-yarn)
8. [Using private packages](docs/advanced-usage.md#use-private-packages)

# License

Expand Down

0 comments on commit b1ed0c3

Please sign in to comment.