Skip to content
Merged
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
12 changes: 9 additions & 3 deletions .github/workflows/call-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ on:
required: false
default: 'lts/*'
type: string
node-version-file:
description: Node.js version file (takes priority over `node-version` if specified)
required: false
default: ''
type: string
os:
description: OS name
required: false
Expand All @@ -16,7 +21,7 @@ on:

jobs:
lint:
name: Lint on Node.js ${{ inputs.node-version }} and ${{ inputs.os }}
name: Lint on Node.js ${{ inputs.node-version-file || inputs.node-version }} and ${{ inputs.os }}

runs-on: ${{ inputs.os }}

Expand All @@ -33,10 +38,11 @@ jobs:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Set up Node.js ${{ inputs.node-version }}
- name: Set up Node.js ${{ inputs.node-version-file || inputs.node-version }}
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ inputs.node-version }}
node-version: ${{ case(!inputs.node-version-file, inputs.node-version, '') }}
node-version-file: ${{ inputs.node-version-file }}
cache: npm

- name: Install latest npm
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/call-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ on:
required: false
default: 'lts/*'
type: string
node-version-file:
description: Node.js version file (takes priority over `node-version` if specified)
required: false
default: ''
type: string
published-url:
description: URL where the package will be published. By default, a npm package URL is constructed.
required: false
Expand Down Expand Up @@ -51,10 +56,11 @@ jobs:
with:
fetch-depth: 0 # Commit history may be required, such as changelog generation etc.

- name: Set up Node.js ${{ inputs.node-version }}
- name: Set up Node.js ${{ inputs.node-version-file || inputs.node-version }}
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ inputs.node-version }}
node-version: ${{ case(!inputs.node-version-file, inputs.node-version, '') }}
node-version-file: ${{ inputs.node-version-file }}
cache: npm

- name: Install latest npm
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/call-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ on:
required: false
default: 'lts/*'
type: string
node-version-file:
description: Node.js version file (takes priority over `node-version` if specified)
required: false
default: ''
type: string
secrets:
# NOTE: If publishing via OIDC is available, this secret may not be required.
# Ref https://github.com/microsoft/vscode-vsce/issues/1133
Expand Down Expand Up @@ -68,10 +73,11 @@ jobs:
exit 1
fi

- name: Set up Node.js ${{ inputs.node-version }}
- name: Set up Node.js ${{ inputs.node-version-file || inputs.node-version }}
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ inputs.node-version }}
node-version: ${{ case(!inputs.node-version-file, inputs.node-version, '') }}
node-version-file: ${{ inputs.node-version-file }}
registry-url: 'https://registry.npmjs.org'
cache: npm

Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ jobs:
lint:
uses: ./.github/workflows/call-lint.yml

lint-node-version-file:
uses: ./.github/workflows/call-lint.yml
with:
node-version-file: .node-version

test:
uses: ./.github/workflows/call-test.yml
with:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Head

- Added: `node-version-file` input to `call-lint`/`call-release`/`call-release-pr` workflows.

## 0.8.0 - 2026-05-06

- Added: Node.js v26 to `call-test` default matrix.
Expand Down
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,16 @@ jobs:
uses: stylelint/.github/.github/workflows/call-lint.yml@d8a0a5b9734a79a67803d47b9aa93e31252a0459 # 0.1.0
# Specify values different from the defaults.
# with:
# node-version: 18
# node-version: '18'
# node-version-file: .node-version
# os: macos-latest

test:
uses: stylelint/.github/.github/workflows/call-test.yml@d8a0a5b9734a79a67803d47b9aa93e31252a0459 # 0.1.0
# Specify values different from the defaults. Need to pass a JSON string.
# with:
# node-version: '["16", "18"]'
# node-version-file: .node-version
# os: '["ubuntu-latest", "windows-latest"]'
# exclude: '[{"node-version": "16", "os": "windows-latest"}]'
# test-options: '--foo --bar'
Expand All @@ -43,11 +45,16 @@ jobs:
uses: stylelint/.github/.github/workflows/call-release-pr.yml@d8a0a5b9734a79a67803d47b9aa93e31252a0459 # 0.1.0
with:
new-version: ${{ github.event.inputs.new-version }}
# Specify values different from the defaults.
# node-version: '18'
# node-version-file: .node-version

release:
uses: stylelint/.github/.github/workflows/call-release.yml@d8a0a5b9734a79a67803d47b9aa93e31252a0459 # 0.1.0
# Specify values different from the defaults.
# with:
# node-version: '18'
# node-version-file: .node-version
# publish: false

dependency-review:
Expand Down
Loading