ci/woodpecker/push/compact-editor-chrome Pipeline was successful
ci/woodpecker/push/context-window Pipeline was successful
ci/woodpecker/push/notifications Pipeline was successful
ci/woodpecker/push/progress Pipeline was successful
ci/woodpecker/push/title-status Pipeline was successful
ci/woodpecker/push/tool-rendering Pipeline was successful
ci/woodpecker/push/welcome Pipeline was successful
@eleith-pi/title-status / check (push) Canceled after 0s
@eleith-pi/title-status / publish (push) Canceled after 0s
@eleith-pi/compact-editor-chrome / check (push) Canceled after 0s
@eleith-pi/compact-editor-chrome / publish (push) Canceled after 0s
@eleith-pi/context-window / check (push) Canceled after 0s
@eleith-pi/context-window / publish (push) Canceled after 0s
@eleith-pi/notifications / check (push) Canceled after 0s
@eleith-pi/notifications / publish (push) Canceled after 0s
@eleith-pi/progress / check (push) Canceled after 0s
@eleith-pi/progress / publish (push) Canceled after 0s
@eleith-pi/tool-rendering / check (push) Canceled after 0s
@eleith-pi/tool-rendering / publish (push) Canceled after 0s
@eleith-pi/welcome / check (push) Canceled after 0s
@eleith-pi/welcome / publish (push) Canceled after 0s
159 lines
4.9 KiB
YAML
159 lines
4.9 KiB
YAML
when:
|
|
- event: push
|
|
branch: main
|
|
path:
|
|
include:
|
|
- extensions/welcome/**
|
|
- packages/internal/**
|
|
- .woodpecker/welcome.yml
|
|
- package.json
|
|
- pnpm-lock.yaml
|
|
- pnpm-workspace.yaml
|
|
- tsconfig.json
|
|
- .oxlintrc.json
|
|
- .oxfmtrc.json
|
|
- .editorconfig
|
|
- .gitignore
|
|
- .changeset/config.json
|
|
on_empty: false
|
|
- event: pull_request
|
|
path:
|
|
include:
|
|
- extensions/welcome/**
|
|
- packages/internal/**
|
|
- .woodpecker/welcome.yml
|
|
- package.json
|
|
- pnpm-lock.yaml
|
|
- pnpm-workspace.yaml
|
|
- tsconfig.json
|
|
- .oxlintrc.json
|
|
- .oxfmtrc.json
|
|
- .editorconfig
|
|
- .gitignore
|
|
- .changeset/config.json
|
|
on_empty: false
|
|
|
|
- event: tag
|
|
ref: "refs/tags/@eleith-pi/welcome@*"
|
|
|
|
workspace:
|
|
base: /workspace
|
|
path: src
|
|
|
|
steps:
|
|
prepare:
|
|
image: node:26
|
|
environment:
|
|
COREPACK_HOME: /workspace/src/.corepack
|
|
commands:
|
|
- npm install --global corepack@latest
|
|
- corepack enable
|
|
- corepack prepare pnpm@11.2.2 --activate
|
|
- pnpm config set store-dir .pnpm-store
|
|
- pnpm install --frozen-lockfile
|
|
|
|
checks:
|
|
image: node:26
|
|
environment:
|
|
COREPACK_HOME: /workspace/src/.corepack
|
|
PI_OFFLINE: "1"
|
|
commands:
|
|
- npm install --global corepack@latest
|
|
- corepack enable
|
|
- pnpm exec oxfmt --check extensions/welcome packages/internal .woodpecker/welcome.yml package.json pnpm-lock.yaml pnpm-workspace.yaml tsconfig.json .oxlintrc.json .oxfmtrc.json .editorconfig .gitignore .changeset/config.json
|
|
- pnpm --filter @eleith-pi/welcome --filter @eleith/pi-internal lint
|
|
- pnpm --filter @eleith-pi/welcome --filter @eleith/pi-internal check
|
|
- pnpm --filter @eleith-pi/welcome --filter @eleith/pi-internal test
|
|
|
|
build:
|
|
image: node:26
|
|
environment:
|
|
COREPACK_HOME: /workspace/src/.corepack
|
|
commands:
|
|
- npm install --global corepack@latest
|
|
- corepack enable
|
|
- pnpm --filter @eleith-pi/welcome build
|
|
|
|
check-version:
|
|
image: node:26
|
|
commands:
|
|
- |
|
|
set -eu
|
|
VERSION_FROM_TAG="$${CI_COMMIT_TAG#@eleith-pi/welcome@}"
|
|
VERSION_FROM_PKG="$$(node -p "require('./extensions/welcome/package.json').version")"
|
|
|
|
if [ "$${VERSION_FROM_TAG}" != "$${VERSION_FROM_PKG}" ]; then
|
|
echo "Version mismatch: Git tag version $${VERSION_FROM_TAG} does not match extensions/welcome/package.json version: $${VERSION_FROM_PKG}"
|
|
exit 1
|
|
fi
|
|
if [ "$${VERSION_FROM_PKG}" = "0.0.0" ]; then
|
|
echo "Refusing to publish @eleith-pi/welcome at placeholder version 0.0.0"
|
|
exit 1
|
|
fi
|
|
when:
|
|
- event: tag
|
|
|
|
publish:
|
|
image: node:26
|
|
environment:
|
|
COREPACK_HOME: /workspace/src/.corepack
|
|
NPM_CONFIG_USERCONFIG: /workspace/src/.cache/welcome-publish.npmrc
|
|
NPM_TOKEN:
|
|
from_secret: gitea_npm_token
|
|
commands:
|
|
- npm install --global corepack@latest
|
|
- corepack enable
|
|
- |
|
|
set -eu
|
|
test -n "$${NPM_TOKEN}"
|
|
VERSION="$$(node -p "require('./extensions/welcome/package.json').version")"
|
|
umask 077
|
|
mkdir -p .cache
|
|
trap 'rm -f "$${NPM_CONFIG_USERCONFIG}"' EXIT
|
|
printf '%s\n' '//git.eleith.com/api/packages/eleith.private/npm/:_authToken=$${NPM_TOKEN}' > "$${NPM_CONFIG_USERCONFIG}"
|
|
|
|
if npm view "@eleith-pi/welcome@$${VERSION}" version --json --registry=https://git.eleith.com/api/packages/eleith.private/npm/ > .cache/welcome-registry.json 2>/dev/null; then
|
|
echo "@eleith-pi/welcome@$${VERSION} is already published; skipping"
|
|
exit 0
|
|
fi
|
|
node -e 'const result = require("./.cache/welcome-registry.json"); if (result.error?.code !== "E404") throw new Error("Registry lookup failed; refusing to publish");'
|
|
pnpm --filter @eleith-pi/welcome publish --registry=https://git.eleith.com/api/packages/eleith.private/npm/ --no-git-checks
|
|
when:
|
|
- event: tag
|
|
|
|
notify-success:
|
|
image: deblan/woodpecker-email:3.2.0
|
|
settings:
|
|
dsn:
|
|
from_secret: woodpecker_email_dsn
|
|
from:
|
|
address:
|
|
from_secret: woodpecker_email_from_address
|
|
name:
|
|
from_secret: woodpecker_email_from_name
|
|
recipients:
|
|
from_secret: woodpecker_email_recipient
|
|
level: success
|
|
recipients_only: true
|
|
when:
|
|
- event: [push, tag]
|
|
status: [success]
|
|
|
|
notify-failure:
|
|
image: deblan/woodpecker-email:3.2.0
|
|
settings:
|
|
dsn:
|
|
from_secret: woodpecker_email_dsn
|
|
from:
|
|
address:
|
|
from_secret: woodpecker_email_from_address
|
|
name:
|
|
from_secret: woodpecker_email_from_name
|
|
recipients:
|
|
from_secret: woodpecker_email_recipient
|
|
level: failure
|
|
recipients_only: true
|
|
when:
|
|
- event: [push, tag]
|
|
status: [failure]
|