diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index bc72b73..16cd5b8 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -29,13 +29,17 @@ jobs: - uses: actions/checkout@v4 - uses: pnpm/action-setup@v4 - with: - version: 10 - # SST 4.x requires Node 22 (silently crashes on 24). - - uses: actions/setup-node@v4 with: - node-version: 22 + + # this repo has no root package.json — the pnpm pin lives in sst/ + + package_json_file: sst/package.json + + # Toolchains come from mise.toml, read here by mise-action so the runner + # and a developer's shell resolve identical versions. + - name: Setup toolchains (mise) + uses: jdx/mise-action@v4 # --no-frozen-lockfile: the committed lockfile carries a # settings.injectWorkspacePackages value that a frozen install rejects diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 084b183..3c4aa3e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,13 +20,26 @@ jobs: - uses: actions/checkout@v4 - uses: pnpm/action-setup@v4 - with: - version: 10 - - uses: actions/setup-node@v4 with: - node-version: 22 - registry-url: 'https://registry.npmjs.org' + + # this repo has no root package.json — the pnpm pin lives in sst/ + + package_json_file: sst/package.json + + # Toolchains come from mise.toml, read here by mise-action so the runner + # and a developer's shell resolve identical versions. + - name: Setup toolchains (mise) + uses: jdx/mise-action@v4 + + # actions/setup-node's `registry-url:` used to write this. npm tries OIDC + # first and falls back to the token, so it stays until this package has + # a trusted publisher registered on npmjs.com. + - name: Configure npm registry auth (token fallback) + run: | + echo "//registry.npmjs.org/:_authToken=\${NODE_AUTH_TOKEN}" > ~/.npmrc + env: + NODE_AUTH_TOKEN: ${{ secrets.SMOOAI_NPM_TOKEN }} - name: Install run: pnpm install --no-frozen-lockfile diff --git a/mise.toml b/mise.toml new file mode 100644 index 0000000..4d5d00a --- /dev/null +++ b/mise.toml @@ -0,0 +1,11 @@ +# Toolchain versions for this repo — read by mise locally and by +# jdx/mise-action in CI, so a developer's shell and the runner agree. +# +# Not listed here on purpose: +# pnpm -> package.json "packageManager". pnpm self-substitutes to that +# version regardless of which pnpm binary launches it, so a mise +# pin would be cosmetic and would drift. +# rust -> rust-toolchain.toml + dtolnay/rust-toolchain. rustup is canonical +# and mise defers to it anyway. +[tools] +node = "24.14.0" # ships npm 11.9.0 — required (>=11.5.1) for npm OIDC trusted publishing diff --git a/sst/package.json b/sst/package.json index 5f9636c..246dced 100644 --- a/sst/package.json +++ b/sst/package.json @@ -46,5 +46,6 @@ }, "publishConfig": { "access": "public" - } + }, + "packageManager": "pnpm@10.34.5" }