Release 0.4.0: npm registry publish, playkit CLI, retry presets
CI / skip-ci-check (pull_request) Successful in 5s
CI / release (pull_request) Has been skipped
CI / build-and-test (pull_request) Successful in 24s
CI / selftest (pull_request) Successful in 23s
CI / secret-scan (pull_request) Successful in 4s

Add Gitea npm publish on tag release, `playkit init`/`smoke` CLI,
and PLAYKIT_RETRY_PRESET profiles. Document install + consumer scaffold.
This commit is contained in:
2026-07-15 09:06:23 -04:00
parent d53d1ad2c7
commit 6d88818fae
14 changed files with 502 additions and 73 deletions
+35 -12
View File
@@ -2,12 +2,29 @@
## 1. Depend on a release
**Preferred (Gitea npm registry):**
```bash
npm install git+https://git.levkin.ca/ilia/playkit.git#v0.3.1
# .npmrc — see docs/NPM_REGISTRY.md
# @levkin:registry=https://git.levkin.ca/api/packages/ilia/npm/
npm install @levkin/playkit@0.4.0
npm install -D @playwright/test
npx playwright install chromium
```
**Fallback (git pin):**
```bash
npm install git+https://git.levkin.ca/ilia/playkit.git#v0.4.0
```
**Scaffold:**
```bash
npx --yes @levkin/playkit init
# or: playkit init
```
## 2. Layout
```
@@ -25,12 +42,22 @@ Store in Infisical `LevkinOps` / `Development` (path e.g. `/playkit/punimtag`):
- `PLAYKIT_BASE_URL=https://punimtagdev.levkin.ca`
- `E2E_ADMIN_EMAIL` / `E2E_ADMIN_PASSWORD` (dedicated test user — not a humans password)
- optional `PLAYKIT_PUSHGATEWAY_URL=http://10.0.10.24:9091` (Pushgateway on the observability LXC — config lives in ansible `deploy/observability/`; scrape job + `live-playkit` Grafana board are wired, but confirm `make deploy-observability` has actually been run before turning `PLAYKIT_METRICS_ENABLED=true` on in CI)
- for mail specs: `PLAYKIT_MAIL_PROVIDER=mailpit` (default) + `MAILPIT_BASE_URL` / `MAILPIT_USER` / `MAILPIT_PASSWORD`, or `MAILTRAP_*` for SaaS
- optional `PLAYKIT_PUSHGATEWAY_URL=http://10.0.10.24:9091`
- optional `PLAYKIT_RETRY_PRESET=strictCi|flakyNetwork|default`
- for mail specs: `PLAYKIT_MAIL_PROVIDER=mailpit` (default) + `MAILPIT_*`, or `MAILTRAP_*`
Sync into Gitea Actions secrets for the consumer repo.
## 4. CI job sketch
## 4. Post-deploy smoke
```bash
PLAYKIT_BASE_URL=https://punimtagdev.levkin.ca playkit smoke
# or: playkit smoke --path /api/health
```
## 5. CI job sketch
See `e2e/ci-snippet.yml` from `playkit init`, or:
```yaml
e2e:
@@ -42,19 +69,15 @@ e2e:
- run: npx playwright test
env:
PLAYKIT_BASE_URL: ${{ secrets.PLAYKIT_BASE_URL }}
PLAYKIT_RETRY_PRESET: strictCi
E2E_ADMIN_EMAIL: ${{ secrets.E2E_ADMIN_EMAIL }}
E2E_ADMIN_PASSWORD: ${{ secrets.E2E_ADMIN_PASSWORD }}
- uses: actions/upload-artifact@v4
if: failure()
with:
name: playwright-report
path: playwright-report/
```
## 5. Deploy rule
## 6. Deploy rule
PR → CI green (unit + e2e when secrets present) → merge → documented deploy script.
Do not claim “fixed” from a bare `pct exec` hotfix without a follow-up PR.
**Adoption pause:** do not add playkit to other app repos until punimtag + kit CI
have soaked for a few days. See `docs/IDEAS.md`.
**Adoption pause:** soak punimtag + kit CI a few more days before migrating
`screening` / `slack-sieve` / `portfolio`. See `docs/IDEAS.md`.
+42
View File
@@ -0,0 +1,42 @@
# Gitea npm registry (@levkin scope)
Gitea Package Registry is enabled on `git.levkin.ca`. Playkit releases can be
installed without a git URL once published.
## Consumer install
`.npmrc` (or CI step):
```ini
@levkin:registry=https://git.levkin.ca/api/packages/ilia/npm/
//git.levkin.ca/api/packages/ilia/npm/:_authToken=${PLAYKIT_GIT_TOKEN}
```
```bash
npm i @levkin/playkit
# or pin: npm i @levkin/playkit@0.4.0
```
Git pin remains supported as a fallback:
```bash
npm i git+https://git.levkin.ca/ilia/playkit.git#v0.4.0
```
## Publish (release job)
On `vX.Y.Z` tag, `.gitea/workflows/ci.yml` `release` job:
1. Creates the Gitea Release + attaches `npm pack` tarball (existing)
2. Runs `npm publish` to `https://git.levkin.ca/api/packages/ilia/npm/`
using `RELEASE_TOKEN` (needs **`write:package`** in addition to release scopes)
One-time: edit the `RELEASE_TOKEN` personal access token / app token on Gitea
to include package write, or add a dedicated `NPM_PUBLISH_TOKEN` secret and
wire it in CI (preferred if you want least privilege).
## Verify
```bash
npm view @levkin/playkit versions --registry https://git.levkin.ca/api/packages/ilia/npm/
```