File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 2424 runs-on : ubuntu-latest
2525 timeout-minutes : 45
2626
27+ strategy :
28+ fail-fast : true
29+ matrix :
30+ node-types-version : [12.12, current]
31+
2732 steps :
2833 - uses : actions/checkout@v2
34+
35+ - name : Update version of @types/node
36+ if : matrix.node-types-version != 'current'
37+ env :
38+ NODE_TYPES_VERSION : ${{ matrix.node-types-version }}
39+ run : |
40+ # Export `NODE_TYPES_VERSION` so it's available to jq
41+ export NODE_TYPES_VERSION="${NODE_TYPES_VERSION}"
42+ contents=$(jq '.devDependencies."@types/node" = env.NODE_TYPES_VERSION' package.json)
43+ echo "${contents}" > package.json
44+ # Usually we run `npm install` on macOS to ensure that we pick up macOS-only dependencies.
45+ # However we're not checking in the updated lockfile here, so it's fine to run
46+ # `npm install` on Linux.
47+ npm install
48+
49+ git config --global user.email "[email protected] " 50+ git config --global user.name "github-actions[bot]"
51+ # The period in `git add --all .` ensures that we stage deleted files too.
52+ git add --all .
53+ git commit -m "Use @types/node=${NODE_TYPES_VERSION}"
54+
2955 - name : Check generated JS
3056 run : .github/workflows/script/check-js.sh
3157
You can’t perform that action at this time.
0 commit comments