use a .node-version file

This commit is contained in:
GrantBirki 2023-10-31 17:07:09 -06:00
parent c0f1204575
commit c9c990c874
No known key found for this signature in database
GPG Key ID: 9029BBCCC15C6F8C
5 changed files with 13 additions and 13 deletions

View File

@ -12,22 +12,17 @@ on:
push:
branches:
- main
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
workflow_dispatch:
permissions:
contents: read
jobs:
check-dist:
name: Check dist/
runs-on: ubuntu-latest
permissions:
contents: read
statuses: write
steps:
- name: Checkout
id: checkout
@ -36,7 +31,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
node-version-file: .node-version
cache: npm
- name: Install Dependencies

View File

@ -21,7 +21,7 @@ jobs:
id: setup-node
uses: actions/setup-node@v4
with:
node-version: 18
node-version-file: .node-version
cache: npm
- name: Install Dependencies

View File

@ -27,7 +27,7 @@ jobs:
id: setup-node
uses: actions/setup-node@v4
with:
node-version: 18
node-version-file: .node-version
cache: npm
- name: Install Dependencies

1
.node-version Normal file
View File

@ -0,0 +1 @@
20.6.0

View File

@ -37,6 +37,10 @@ need to perform some initial setup steps before you can develop your action.
> [`nvm`](https://github.com/nvm-sh/nvm), you can run `nodenv install` in the
> root of your repository to install the version specified in
> [`package.json`](./package.json). Otherwise, 20.x or later should work!
> This template has a `.node-version` file at the root of the repository that
> will be used by `nodenv` or `nvm` to automatically switch to the correct
> version of Node.js when you `cd` into the repository. Additionally, this
> `.node-version` file is used by GitHub Actions in a few CI jobs.
1. :hammer_and_wrench: Install the dependencies
@ -44,13 +48,13 @@ need to perform some initial setup steps before you can develop your action.
npm install
```
1. :building_construction: Package the TypeScript for distribution
2. :building_construction: Package the TypeScript for distribution
```bash
npm run bundle
```
1. :white_check_mark: Run the tests
3. :white_check_mark: Run the tests
```bash
$ npm test