Files
telemetry-client-js/.woodpecker.yml
Jason Woltje 231a799a46
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
docs(#1): SDK integration guide, API reference, and CI pipeline
- Rewrite README with quick start, config table, prediction usage, API version note
- Add docs/integration-guide.md with Next.js and Node.js examples, env-specific
  config, error handling patterns, batch behavior, and API version compatibility
- Add docs/api-reference.md with full reference for all exported classes, methods,
  types, and enums
- Add .woodpecker.yml with quality gates (lint, typecheck, format, security audit,
  test with coverage) and npm publish to Gitea registry
- Add AGENTS.md and update CLAUDE.md with project conventions

Fixes #1

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 22:38:19 -06:00

92 lines
1.9 KiB
YAML

when:
- event: [push, pull_request, manual]
variables:
- &node_image "node:22-alpine"
- &install_deps |
corepack enable
npm ci
steps:
install:
image: *node_image
commands:
- *install_deps
lint:
image: *node_image
commands:
- *install_deps
- npm run lint
depends_on:
- install
typecheck:
image: *node_image
commands:
- *install_deps
- npm run typecheck
depends_on:
- install
format-check:
image: *node_image
commands:
- *install_deps
- npm run format:check
depends_on:
- install
security-audit:
image: *node_image
commands:
- npm audit --audit-level=high
depends_on:
- install
test:
image: *node_image
commands:
- *install_deps
- npm run test:coverage
depends_on:
- install
build:
image: *node_image
commands:
- *install_deps
- npm run build
depends_on:
- lint
- typecheck
- format-check
- security-audit
- test
publish:
image: *node_image
environment:
GITEA_TOKEN:
from_secret: gitea_token
commands:
- *install_deps
- npm run build
- |
echo "//git.mosaicstack.dev/api/packages/mosaic/npm/:_authToken=$$GITEA_TOKEN" > .npmrc
echo "@mosaicstack:registry=https://git.mosaicstack.dev/api/packages/mosaic/npm/" >> .npmrc
- |
CURRENT=$(node -p "require('./package.json').version")
PUBLISHED=$(npm view @mosaicstack/telemetry-client version 2>/dev/null || echo "0.0.0")
if [ "$$CURRENT" = "$$PUBLISHED" ]; then
echo "Version $$CURRENT already published, skipping"
exit 0
fi
echo "Publishing $$CURRENT (was $$PUBLISHED)"
npm publish --access public
when:
- branch: [main, develop]
event: [push, manual, tag]
depends_on:
- build