Compare commits

...
Author SHA1 Message Date
Lotus CIandClaude Opus 5 872b877248 ci(lotus): read the npm publish token from NPM_PUBLISH_TOKEN
CI / Build embedded bundle (push) Successful in 1m23s
CI / Publish to Gitea npm registry (push) Successful in 42s
Gitea reserves secret names beginning with GITEA_, so the
`GITEA_NPM_TOKEN` this workflow has referenced since the fork's first
commit could never be created — which is why CI publishing never worked
and the June release was pushed by hand. Rename to NPM_PUBLISH_TOKEN
(org secret, write:package).

Refs #22

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA
2026-09-12 19:13:23 -04:00
Lotus CIandClaude Opus 5 c0a2103822 ci(lotus): publish prereleases under the lotus dist-tag
CI / Build embedded bundle (push) Successful in 1m55s
CI / Publish to Gitea npm registry (push) Failing after 52s
Run #1861 built fine but `npm publish` refused: "You must specify a tag
using --tag when publishing a prerelease version" (npm 11 rule). Add
`--tag lotus`; cinny pins exact versions so the dist-tag is only a
namespace.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA
2026-09-12 14:36:05 -04:00
Lotus CIandClaude Opus 5 d203e7a33e ci(lotus): scope VITE_APP_VERSION to the build step
CI / Build embedded bundle (push) Successful in 3m3s
CI / Publish to Gitea npm registry (push) Failing after 44s
Run #1859: install, tsc, oxlint, knip and oxfmt all passed; the unit
suite then failed 1/648 — DeveloperSettingsTab's snapshot expects the
version to read "dev" when VITE_APP_VERSION is unset, but the workflow
exported it (= "lotus") at workflow level, so it leaked into the tests.
Set it on the two build steps only, which is the only place it matters.
Reproduced locally: the test fails with the variable set and passes
without it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA
2026-09-12 14:24:43 -04:00
Lotus CIandClaude Opus 5 f111d1d2aa ci(lotus): gitignore .pnpm-store so knip doesn't scan the runner's store
CI / Build embedded bundle (push) Failing after 1m55s
CI / Publish to Gitea npm registry (push) Skipped
Run #1858 got past install, tsc and oxlint; knip then failed with 1188
"unused files" — all under .pnpm-store/, because the Gitea runner keeps
pnpm's content store inside the checkout, and it now contains the
from-source matrix-js-sdk tree. knip honours .gitignore, so ignoring the
store directory (verified locally with a synthetic .pnpm-store) is enough.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA
2026-09-12 14:18:26 -04:00
Lotus CIandClaude Opus 5 b6176e07dd ci(lotus): remove the cached corepack pnpm shim before installing pnpm
CI / Build embedded bundle (push) Failing after 3m33s
CI / Publish to Gitea npm registry (push) Skipped
Run #1855: `npm install -g pnpm@…` failed with EEXIST because the runner's
persistent hostedtoolcache Node install still carries the corepack `pnpm`
shim from earlier `corepack enable` runs, and npm won't overwrite it.
Disable/remove the shim first, then install, and print the version so the
log shows which pnpm actually ran.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA
2026-09-12 13:02:44 -04:00
Lotus CIandClaude Opus 5 8945c29725 ci(lotus): install pnpm directly — corepack shim breaks the matrix-js-sdk prepare
CI / Build embedded bundle (push) Failing after 1m13s
CI / Publish to Gitea npm registry (push) Skipped
Run #1854 failed in `pnpm install --frozen-lockfile`: matrix-js-sdk is a
git dependency (upstream pins matrix-org/matrix-js-sdk#develop) that pnpm
must build from source, and that source's devEngines pins pnpm 11.9.0.
Under `corepack enable` the nested `pnpm install` runs the 11.21.0 shim,
which refuses to switch versions ("pnpm does not switch versions when
running under corepack") and the prepare step aborts. Reproduced locally
with a fresh store; with a real pnpm binary the nested install downloads
11.9.0 itself and succeeds.

Both jobs now `npm install -g pnpm@<version>` with the version read from
package.json's packageManager field.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA
2026-09-12 12:09:46 -04:00
2 changed files with 56 additions and 8 deletions
+55 -8
View File
@@ -29,8 +29,6 @@ concurrency:
env:
# element-call's build:full sets 16384 already; keep parity for safety.
NODE_OPTIONS: "--max-old-space-size=16384"
# Stamp the build so analytics/rageshakes aren't labelled "dev".
VITE_APP_VERSION: ${{ github.ref_name }}
jobs:
build:
@@ -48,8 +46,23 @@ jobs:
registry-url: "https://code.lotusguild.org/api/packages/LotusGuild/npm/"
scope: "@lotusguild"
- name: Enable corepack (pnpm from packageManager field)
run: corepack enable
# pnpm is installed directly (NOT via `corepack enable`): matrix-js-sdk
# is a git dependency that pnpm has to build from source, and its own
# devEngines pins a different pnpm (11.9.0). A corepack-shimmed pnpm
# refuses to switch versions for that nested install and the whole
# `pnpm install` fails (run #1854); a real pnpm binary downloads the
# pinned version itself. Version is read from package.json's
# packageManager field so it cannot drift from the lockfile.
- name: Install pnpm (version from packageManager field)
# The runner's cached Node toolchain keeps a corepack `pnpm` shim from
# earlier runs, and npm refuses to overwrite it (EEXIST, run #1855) —
# drop the shim first so the real binary lands.
run: |
B="$(dirname "$(command -v node)")"
corepack disable pnpm 2>/dev/null || true
rm -f "$B/pnpm" "$B/pnpx"
npm install -g "pnpm@$(node -p "require('./package.json').packageManager.split('@')[1].split('+')[0]")"
pnpm --version
- name: Install dependencies
run: pnpm install --frozen-lockfile
@@ -71,6 +84,12 @@ jobs:
# Stage it into embedded/web/dist — the publish template's "files" entry
# — so the smoke-check and npm publish both see the bundle.
# (embedded/web/dist is gitignored, hence the explicit copy.)
# VITE_APP_VERSION stamps the bundle so analytics/rageshakes aren't
# labelled "dev". Scoped to the build step only: at workflow level it
# also reached the unit tests, whose DeveloperSettingsTab snapshot
# expects the unset ("dev") value (run #1859).
env:
VITE_APP_VERSION: ${{ github.ref_name }}
run: |
pnpm run build:embedded
rm -rf embedded/web/dist
@@ -110,8 +129,23 @@ jobs:
registry-url: "https://code.lotusguild.org/api/packages/LotusGuild/npm/"
scope: "@lotusguild"
- name: Enable corepack
run: corepack enable
# pnpm is installed directly (NOT via `corepack enable`): matrix-js-sdk
# is a git dependency that pnpm has to build from source, and its own
# devEngines pins a different pnpm (11.9.0). A corepack-shimmed pnpm
# refuses to switch versions for that nested install and the whole
# `pnpm install` fails (run #1854); a real pnpm binary downloads the
# pinned version itself. Version is read from package.json's
# packageManager field so it cannot drift from the lockfile.
- name: Install pnpm (version from packageManager field)
# The runner's cached Node toolchain keeps a corepack `pnpm` shim from
# earlier runs, and npm refuses to overwrite it (EEXIST, run #1855) —
# drop the shim first so the real binary lands.
run: |
B="$(dirname "$(command -v node)")"
corepack disable pnpm 2>/dev/null || true
rm -f "$B/pnpm" "$B/pnpx"
npm install -g "pnpm@$(node -p "require('./package.json').packageManager.split('@')[1].split('+')[0]")"
pnpm --version
- name: Install dependencies
run: pnpm install --frozen-lockfile
@@ -121,6 +155,12 @@ jobs:
# Stage it into embedded/web/dist — the publish template's "files" entry
# — so the smoke-check and npm publish both see the bundle.
# (embedded/web/dist is gitignored, hence the explicit copy.)
# VITE_APP_VERSION stamps the bundle so analytics/rageshakes aren't
# labelled "dev". Scoped to the build step only: at workflow level it
# also reached the unit tests, whose DeveloperSettingsTab snapshot
# expects the unset ("dev") value (run #1859).
env:
VITE_APP_VERSION: ${{ github.ref_name }}
run: |
pnpm run build:embedded
rm -rf embedded/web/dist
@@ -137,8 +177,15 @@ jobs:
TAG="${GITHUB_REF_NAME#v}" # v0.20.1-lotus.1 -> 0.20.1-lotus.1
npm version "$TAG" --no-git-tag-version --allow-same-version
# `--tag lotus`: npm >= 11 refuses to publish a prerelease (x.y.z-lotus.N)
# without an explicit dist-tag (run #1861). cinny pins exact versions, so
# the dist-tag is only a namespace — it keeps `latest` pointing at the
# last upstream-parity publish.
- name: Publish
working-directory: embedded/web
# Secret names starting with GITEA_ are reserved and can't be created, so
# the original `GITEA_NPM_TOKEN` never existed (every CI publish since the
# fork's first commit hit ENEEDAUTH). Org secret, write:package scope.
env:
NODE_AUTH_TOKEN: ${{ secrets.GITEA_NPM_TOKEN }}
run: npm publish --access public
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
run: npm publish --access public --tag lotus
+1
View File
@@ -38,3 +38,4 @@ yarn-error.log
*storybook.log
storybook-static
.pnpm-store/