File: _step-node.yml

package info (click to toggle)
node-tar 6.2.1%2Bds1%2B~cs6.1.13-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,488 kB
  • sloc: javascript: 13,309; makefile: 8
file content (31 lines) | stat: -rw-r--r-- 1,147 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
- name: Setup Node
  uses: actions/setup-node@v3
  with:
    node-version: {{#if jobIsMatrix}}$\{{ matrix.node-version }}{{else}}{{ last ciVersions }}{{/if}}
    {{#if lockfile}}
    cache: npm
    {{/if}}
{{#if updateNpm}}
{{#if jobIsMatrix}}
- name: Update Windows npm
  # node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows
  if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12.') || startsWith(matrix.node-version, '14.'))
  run: |
    curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz
    tar xf npm-7.5.4.tgz
    cd package
    node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz
    cd ..
    rmdir /s /q package
- name: Install npm@7
  if: startsWith(matrix.node-version, '10.') || startsWith(matrix.node-version, '12.')
  run: npm i --prefer-online --no-fund --no-audit -g npm@7
- name: Install npm@latest
  if: $\{{ !startsWith(matrix.node-version, '10.') && !startsWith(matrix.node-version, '12.') }}
{{else}}
- name: Install npm@latest
{{/if}}
  run: npm i --prefer-online --no-fund --no-audit -g npm@latest
- name: npm Version
  run: npm -v
{{/if}}