diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml index 82469c2..6eb5e8b 100644 --- a/.github/workflows/commitlint.yml +++ b/.github/workflows/commitlint.yml @@ -39,6 +39,13 @@ jobs: with: node-version: "24" + - name: Enable pnpm + run: | + # Node 24 ships corepack; later Node majors do not, so a node-version bump + # must install pnpm another way. + corepack enable + corepack prepare pnpm@12.4.1 --activate + - name: Prepare commitlint run: scripts/install_commitlint.sh diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 6461d46..2e9f088 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -118,6 +118,14 @@ jobs: with: node-version: "24" + - name: Enable pnpm + if: ${{ steps.release-pr.outputs.found == 'true' }} + run: | + # Node 24 ships corepack; later Node majors do not, so a node-version bump + # must install pnpm another way. + corepack enable + corepack prepare pnpm@12.4.1 --activate + - name: Mark release PR commitlint pending if: ${{ steps.release-pr.outputs.found == 'true' }} env: diff --git a/renovate.json b/renovate.json index c9c478d..5fc1840 100644 --- a/renovate.json +++ b/renovate.json @@ -55,6 +55,18 @@ "datasourceTemplate": "npm", "packageNameTemplate": "tessl", "versioningTemplate": "semver" + }, + { + "customType": "regex", + "managerFilePatterns": [ + "/^\\.github/workflows/(?:commitlint|release-please)\\.yml$/" + ], + "matchStrings": [ + "corepack prepare pnpm@(?\\d+\\.\\d+\\.\\d+)" + ], + "depNameTemplate": "pnpm", + "datasourceTemplate": "npm", + "versioningTemplate": "semver" } ], "packageRules": [ diff --git a/scripts/commitlint_release_pr.sh b/scripts/commitlint_release_pr.sh index b1b7aca..e57b8a6 100755 --- a/scripts/commitlint_release_pr.sh +++ b/scripts/commitlint_release_pr.sh @@ -20,7 +20,7 @@ commitlint_home="${RUNNER_TEMP:-$(mktemp -d)}/commitlint" mkdir -p "$commitlint_home" printf '{"private":true}\n' > "$commitlint_home/package.json" cp commitlint.config.cjs "$commitlint_home/commitlint.config.cjs" -npm --prefix "$commitlint_home" install --silent --ignore-scripts \ +pnpm --dir "$commitlint_home" add --silent --ignore-scripts \ @commitlint/cli@21.2.2 \ @commitlint/config-conventional@21.2.2 diff --git a/scripts/install_commitlint.sh b/scripts/install_commitlint.sh index db90a49..bc8adef 100755 --- a/scripts/install_commitlint.sh +++ b/scripts/install_commitlint.sh @@ -5,7 +5,7 @@ commitlint_home="${RUNNER_TEMP:-$(mktemp -d)}/commitlint" mkdir -p "$commitlint_home" printf '{"private":true}\n' > "$commitlint_home/package.json" cp commitlint.config.cjs "$commitlint_home/commitlint.config.cjs" -npm --prefix "$commitlint_home" install --silent --ignore-scripts \ +pnpm --dir "$commitlint_home" add --silent --ignore-scripts \ @commitlint/cli@21.2.2 \ @commitlint/config-conventional@21.2.2