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

ci: use .nvmrc for node versioning in workflows #18736

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
36 changes: 18 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Use Node.js 20.x
- name: Use Node.js version from .nvmrc
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version: '20.x'
node-version-file: '.nvmrc'
- name: Run yarn dedupe
run: yarn dedupe --check

format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Use Node.js 20.x
- name: Use Node.js version from .nvmrc
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version: '20.x'
node-version-file: '.nvmrc'
- name: Install dependencies
env:
YARN_ENABLE_HARDENED_MODE: 0
Expand All @@ -44,10 +44,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Use Node.js 20.x
- name: Use Node.js version from .nvmrc
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version: '20.x'
node-version-file: '.nvmrc'
- name: Install dependencies
env:
YARN_ENABLE_HARDENED_MODE: 0
Expand All @@ -61,10 +61,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Use Node.js 20.x
- name: Use Node.js version from .nvmrc
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version: '20.x'
node-version-file: '.nvmrc'
- uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4.2.1
if: github.event_name != 'merge_group'
id: cache
Expand Down Expand Up @@ -94,10 +94,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Use Node.js 20.x
- name: Use Node.js version from .nvmrc
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: '20.x'
node-version-file: '.nvmrc'
- uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4.2.1
if: github.event_name != 'merge_group'
id: cache
Expand All @@ -123,10 +123,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Use Node.js 20.x
- name: Use Node.js version from .nvmrc
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version: '20.x'
node-version-file: '.nvmrc'
- uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4.2.1
if: github.event_name != 'merge_group'
id: cache
Expand Down Expand Up @@ -169,10 +169,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Use Node.js 20.x
- name: Use Node.js version from .nvmrc
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version: '20.x'
node-version-file: '.nvmrc'
- uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4.2.1
if: github.event_name != 'merge_group'
id: cache
Expand Down Expand Up @@ -238,10 +238,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Use Node.js 20.x
- name: Use Node.js version from .nvmrc
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version: '20.x'
node-version-file: '.nvmrc'
- uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4.2.1
if: github.event_name != 'merge_group'
id: cache
Expand Down Expand Up @@ -303,10 +303,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Use Node.js 20.x
- name: Use Node.js version from .nvmrc
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version: '20.x'
node-version-file: '.nvmrc'
- uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4.2.1
if: github.event_name != 'merge_group'
id: cache
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/deploy-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:
with:
repository: carbon-design-system/design-language-website
ref: master
- name: Use Node.js 20.x
- name: Use Node.js version from .nvmrc
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version: '20.x'
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
- name: Update dependencies
run: |
Expand Down Expand Up @@ -62,10 +62,10 @@ jobs:
with:
repository: carbon-design-system/gatsby-theme-carbon
ref: main
- name: Use Node.js 20.x
- name: Use Node.js version from .nvmrc
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version: '20.x'
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
- name: Update dependencies
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-react-storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
- name: Use Node.js 20.x
- name: Use Node.js version from .nvmrc
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version: '20.x'
node-version-file: '.nvmrc'
- name: Install dependencies
run: yarn install --immutable --immutable-cache
- name: Build project
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-web-components-storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Use Node.js 20.x
- name: Use Node.js version from .nvmrc
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version: '20.x'
node-version-file: '.nvmrc'
- name: Install dependencies
run: yarn install --immutable --immutable-cache
- name: Build project
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nightly-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
contents: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Use Node.js 20.x
- name: Use Node.js version from .nvmrc
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version: '20.x'
node-version-file: '.nvmrc'
- name: Install dependencies
run: yarn install --immutable --immutable-cache --check-cache
- name: Build project
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/publish-web-components-cdn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
- name: Use Node.js 18.x
uses: actions/setup-node@v4
with:
# TODO: Should this Node.js version be upgraded?
node-version: '18.x'
cache: 'yarn'
- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Use Node.js 20.x
- name: Use Node.js version from .nvmrc
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version: '20.x'
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sync-generated-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Use Node.js 20.x
- name: Use Node.js version from .nvmrc
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version: '20.x'
node-version-file: '.nvmrc'
- name: Install dependencies
run: yarn install --immutable --immutable-cache
- name: Build project
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/v10-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Use Node.js 20.x
- name: Use Node.js version from .nvmrc
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version: '20.x'
node-version-file: '.nvmrc'
- name: Run yarn dedupe
run: yarn dedupe --check

Expand All @@ -28,10 +28,10 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: v10
- name: Use Node.js 20.x
- name: Use Node.js version from .nvmrc
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version: '20.x'
node-version-file: '.nvmrc'
- name: Install dependencies
run: yarn install --immutable --immutable-cache
- name: Check formatting of project files
Expand All @@ -43,10 +43,10 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: v10
- name: Use Node.js 20.x
- name: Use Node.js version from .nvmrc
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version: '20.x'
node-version-file: '.nvmrc'
- name: Install dependencies
run: yarn install --immutable --immutable-cache
- name: Lint JavaScript files
Expand All @@ -60,10 +60,10 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: v10
- name: Use Node.js 20.x
- name: Use Node.js version from .nvmrc
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version: '20.x'
node-version-file: '.nvmrc'
- uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4.2.1
id: cache
with:
Expand All @@ -88,10 +88,10 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: v10
- name: Use Node.js 20.x
- name: Use Node.js version from .nvmrc
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version: '20.x'
node-version-file: '.nvmrc'
- uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4.2.1
id: cache
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/v10-deploy-react-storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Use Node.js 20.x
- name: Use Node.js version from .nvmrc
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version: '20.x'
node-version-file: '.nvmrc'
- name: Install dependencies
run: yarn install --immutable --immutable-cache
- name: Build project
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/v10-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Use Node.js 20.x
- name: Use Node.js version from .nvmrc
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version: '20.x'
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: '0'
- name: Use Node.js 20.x
- name: Use Node.js version from .nvmrc
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version: '20.x'
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
- uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4.2.1
id: cache
Expand Down
Loading