diff --git a/.github/workflows/ci-markdown.yml b/.github/workflows/ci-markdown.yml index df1d244..531a483 100644 --- a/.github/workflows/ci-markdown.yml +++ b/.github/workflows/ci-markdown.yml @@ -23,6 +23,7 @@ jobs: - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: - node-version: 24 + # renovate: datasource=node-version depName=node + node-version: "26" - run: npx markdownlint-cli2 "${{ inputs.glob }}" diff --git a/.github/workflows/ci-node.yml b/.github/workflows/ci-node.yml index 85c3761..8082011 100644 --- a/.github/workflows/ci-node.yml +++ b/.github/workflows/ci-node.yml @@ -2,12 +2,6 @@ name: CI (Node.js) on: workflow_call: - inputs: - node-version: - description: Node.js version - type: string - # renovate: datasource=node-version depName=node - default: "26" permissions: contents: read @@ -18,14 +12,25 @@ jobs: steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1 + # Toolchain comes from the calling repository's .mise.toml — the single + # source of truth for node/pnpm versions, kept fresh by Renovate. + - uses: jdx/mise-action@3277a0f272901982804abc53abd93520db809be4 # v5.4.0 + with: + # renovate: datasource=github-releases depName=jdx/mise + version: "2026.11.16" + + - name: Resolve pnpm store path + id: pnpm-store + run: echo "path=$(pnpm store path)" >> "$GITHUB_OUTPUT" - - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + - uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 with: - node-version: ${{ inputs.node-version }} - cache: pnpm + path: ${{ steps.pnpm-store.outputs.path }} + key: pnpm-store-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }} + restore-keys: | + pnpm-store-${{ runner.os }}- - - run: pnpm install --frozen-lockfile || { echo "::error::Lockfile out of date. Run 'pnpm install' locally and commit pnpm-lock.yaml"; exit 1; } + - run: pnpm install --frozen-lockfile --ignore-scripts || { echo "::error::Lockfile out of date. Run 'pnpm install' locally and commit pnpm-lock.yaml"; exit 1; } - run: pnpm run --if-present build - run: pnpm run --if-present lint - run: pnpm run --if-present typecheck diff --git a/.github/workflows/publish-node.yml b/.github/workflows/publish-node.yml index 00a2247..412879c 100644 --- a/.github/workflows/publish-node.yml +++ b/.github/workflows/publish-node.yml @@ -17,7 +17,8 @@ jobs: - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: - node-version: 24 + # renovate: datasource=node-version depName=node + node-version: "26" registry-url: https://registry.npmjs.org - run: pnpm install --frozen-lockfile diff --git a/actions/setup-toolchain/action.yml b/actions/setup-toolchain/action.yml new file mode 100644 index 0000000..2fe9de1 --- /dev/null +++ b/actions/setup-toolchain/action.yml @@ -0,0 +1,34 @@ +name: setup-toolchain +description: Install mise-managed runtimes and, for pnpm repos, the lockfile-pinned dependencies + +inputs: + install: + description: Run pnpm install --frozen-lockfile --ignore-scripts when pnpm-lock.yaml exists + default: "true" + +runs: + using: composite + steps: + - uses: jdx/mise-action@3277a0f272901982804abc53abd93520db809be4 # v5.4.0 + with: + # renovate: datasource=github-releases depName=jdx/mise + version: "2026.11.16" + + - name: Resolve pnpm store path + if: hashFiles('pnpm-lock.yaml') != '' + id: pnpm-store + shell: bash + run: echo "path=$(pnpm store path)" >> "$GITHUB_OUTPUT" + + - uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 + if: hashFiles('pnpm-lock.yaml') != '' + with: + path: ${{ steps.pnpm-store.outputs.path }} + key: pnpm-store-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }} + restore-keys: | + pnpm-store-${{ runner.os }}- + + - name: Install dependencies + if: inputs.install == 'true' && hashFiles('pnpm-lock.yaml') != '' + shell: bash + run: pnpm install --frozen-lockfile --ignore-scripts || { echo "::error::Lockfile out of date. Run 'pnpm install' locally and commit pnpm-lock.yaml"; exit 1; }