## Library CI pipeline — for npm package publishing ## Configure project via service.yaml kind: pipeline type: kubernetes name: ci steps: - name: prepare image: alpine:3.19 environment: GITEA_TOKEN: from_secret: GITEA_TOKEN commands: - apk add --no-cache git bash yq - git clone --depth 1 https://token:$GITEA_TOKEN@git.vigdorov.ru/vigdorov/ci-templates.git .ci - chmod +x .ci/scripts/*.sh - bash .ci/scripts/prepare.sh - name: install image: node:22-alpine depends_on: [prepare] commands: - npm ci - name: test image: node:22-alpine depends_on: [install] commands: - npm run lint - npm run test - npm run check - name: build image: node:22-alpine depends_on: [test] commands: - npm run build - name: publish image: node:22-alpine depends_on: [build] environment: GITEA_TOKEN: from_secret: GITEA_TOKEN commands: - apk add --no-cache bash - bash .ci/scripts/publish-lib.sh trigger: branch: [main] event: [push, custom]