Skip to content

Commit

Permalink
Update default runtime to node16 (#449)
Browse files Browse the repository at this point in the history
* Update default runtime to node16

* Add Node version file and use it in workflows

* Use built-in cache from actions/setup-node for yarn
  • Loading branch information
ocean90 authored Apr 23, 2022
1 parent 88c83d2 commit 650a481
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 29 deletions.
15 changes: 2 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,8 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 12

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Set up cache
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
node-version-file: ".nvmrc"
cache: "yarn"

- name: Install dependencies
run: yarn install
Expand Down
15 changes: 2 additions & 13 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,8 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 12

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Set up cache
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
node-version-file: ".nvmrc"
cache: "yarn"

- name: Install dependencies
run: yarn install
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 12
node-version-file: ".nvmrc"
cache: "yarn"

- name: Install dependencies
run: yarn install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 12
node-version-file: ".nvmrc"

- name: Get yarn cache directory path
id: yarn-cache-dir-path
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
16
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ inputs:
default: "true"

runs:
using: node12
using: node16
main: ./dist/index.js

branding:
Expand Down

0 comments on commit 650a481

Please sign in to comment.