Skip to content

Commit

Permalink
use a .node-version file
Browse files Browse the repository at this point in the history
  • Loading branch information
GrantBirki committed Oct 31, 2023
1 parent c0f1204 commit c9c990c
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
13 changes: 4 additions & 9 deletions .github/workflows/check-dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20.6.0
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,24 @@ 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

```bash
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
Expand Down

0 comments on commit c9c990c

Please sign in to comment.