Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: install Node v16 when lockfileVersion is 2 #187

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/if-nodejs-pr-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,25 @@ jobs:
run: test -e ./package.json && echo "::set-output name=exists::true" || echo "::set-output name=exists::false"
shell: bash
- if: steps.packagejson.outputs.exists == 'true'
name: Check package-lock.json lockfileVersion
id: packagelockjson
shell: bash
run: |
grep '"lockfileVersion": 1' package-lock.json && echo "::set-output name=lockfileVersion::1" || echo "::set-output name=lockfileVersion::2"
- if: steps.packagejson.outputs.exists == 'true' && steps.packagelockjson.outputs.lockfileVersion == 1
name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 14
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- if: steps.packagejson.outputs.exists == 'true' && steps.packagelockjson.outputs.lockfileVersion == 2
name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 16
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- if: steps.packagejson.outputs.exists == 'true'
name: Install dependencies
id: first-installation
Expand Down
30 changes: 29 additions & 1 deletion .github/workflows/if-nodejs-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,25 @@ jobs:
run: test -e ./package.json && echo "::set-output name=exists::true" || echo "::set-output name=exists::false"
shell: bash
- if: steps.packagejson.outputs.exists == 'true'
name: Check package-lock.json lockfileVersion
id: packagelockjson
shell: bash
run: |
grep '"lockfileVersion": 1' package-lock.json && echo "::set-output name=lockfileVersion::1" || echo "::set-output name=lockfileVersion::2"
- if: steps.packagejson.outputs.exists == 'true' && steps.packagelockjson.outputs.lockfileVersion == 1
name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 14
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- if: steps.packagejson.outputs.exists == 'true' && steps.packagelockjson.outputs.lockfileVersion == 2
name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 16
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- if: steps.packagejson.outputs.exists == 'true'
name: Install dependencies
run: npm install
Expand Down Expand Up @@ -82,10 +95,25 @@ jobs:
id: packagejson
run: test -e ./package.json && echo "::set-output name=exists::true" || echo "::set-output name=exists::false"
- if: steps.packagejson.outputs.exists == 'true'
name: Check package-lock.json lockfileVersion
id: packagelockjson
shell: bash
run: |
grep '"lockfileVersion": 1' package-lock.json && echo "::set-output name=lockfileVersion::1" || echo "::set-output name=lockfileVersion::2"
- if: steps.packagejson.outputs.exists == 'true' && steps.packagelockjson.outputs.lockfileVersion == 1
name: Setup Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v2
with:
node-version: 14
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- if: steps.packagejson.outputs.exists == 'true' && steps.packagelockjson.outputs.lockfileVersion == 2
name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 16
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- if: steps.packagejson.outputs.exists == 'true'
name: Install dependencies
run: npm install
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/if-nodejs-version-bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,25 @@ jobs:
id: packagejson
run: test -e ./package.json && echo "::set-output name=exists::true" || echo "::set-output name=exists::false"
- if: steps.packagejson.outputs.exists == 'true'
name: Check package-lock.json lockfileVersion
id: packagelockjson
shell: bash
run: |
grep '"lockfileVersion": 1' package-lock.json && echo "::set-output name=lockfileVersion::1" || echo "::set-output name=lockfileVersion::2"
- if: steps.packagejson.outputs.exists == 'true' && steps.packagelockjson.outputs.lockfileVersion == 1
name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 14
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- if: steps.packagejson.outputs.exists == 'true' && steps.packagelockjson.outputs.lockfileVersion == 2
name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 16
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- if: steps.packagejson.outputs.exists == 'true'
name: Install dependencies
run: npm install
Expand Down