Registry-Entscheidung evidenzbasiert: das Package ist pnpm-Dependency von ThreadNet-Webs apps/web, der Lockfile pinnt die Tarball-URL auf rohana - Registry bleibt dort. Publish-Auth ueber CI-Variable GITEA_NPM_TOKEN statt lokaler Klartext-.npmrc. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
64 lines
2.1 KiB
YAML
64 lines
2.1 KiB
YAML
# GitLab-CI fuer den threadnet-call-Fork (Lab-GitLab; siehe docs/axion1337-fork.md).
|
|
# Ersetzt die geerbten, hier nie lauffaehigen Upstream-Workflows (threadnet-call#1).
|
|
# Trigger-Schema wie ThreadNet-Web: Pushes pruefen nur bei relevanten Pfaden,
|
|
# Veroeffentlichen ist ein bewusster manueller Akt.
|
|
|
|
stages:
|
|
- build
|
|
- publish
|
|
|
|
build_embedded:
|
|
stage: build
|
|
image: node:24-bullseye
|
|
rules:
|
|
- if: $CI_COMMIT_TAG =~ /^v/
|
|
- if: $CI_COMMIT_BRANCH
|
|
changes:
|
|
- src/**/*
|
|
- embedded/**/*
|
|
- public/**/*
|
|
- package.json
|
|
- pnpm-lock.yaml
|
|
- vite*.config.*
|
|
- .gitlab-ci.yml
|
|
before_script:
|
|
- corepack enable
|
|
script:
|
|
- pnpm install --frozen-lockfile
|
|
# baut mit der media_quality-Konfiguration aus vite-embedded.config.ts
|
|
# (1440p-Defaults, h264 - siehe docs/axion1337-fork.md)
|
|
- pnpm build:embedded
|
|
artifacts:
|
|
paths:
|
|
- embedded/web/dist
|
|
expire_in: 1 week
|
|
|
|
# Publisht das Embedded-Package in die Gitea-npm-Registry auf rohana - dort MUSS es
|
|
# bleiben, solange ThreadNet-Webs pnpm-lock.yaml die Tarball-URL darauf pinnt
|
|
# (Konsument: apps/web-Dependency @sorb/threadnet-call-embedded).
|
|
# Versionierung: package.json-Version in embedded/web VOR dem Publish per Commit bumpen.
|
|
# Auth: CI-Variable GITEA_NPM_TOKEN (Gitea-Token, Scope write:package) - ersetzt die
|
|
# fruehere lokale, untracked .npmrc mit Klartext-Token (Rotationsliste CFGMON-11).
|
|
publish_npm:
|
|
stage: publish
|
|
image: node:24-bullseye
|
|
needs:
|
|
- job: build_embedded
|
|
artifacts: true
|
|
rules:
|
|
- if: $CI_COMMIT_TAG =~ /^v/
|
|
when: manual
|
|
allow_failure: true
|
|
- if: $CI_COMMIT_BRANCH == "main"
|
|
when: manual
|
|
allow_failure: true
|
|
script:
|
|
- test -n "$GITEA_NPM_TOKEN" || { echo "CI-Variable GITEA_NPM_TOKEN fehlt (Gitea-Token mit write:package)"; exit 1; }
|
|
- |
|
|
cat > embedded/web/.npmrc <<EOF
|
|
@sorb:registry=https://rohana.axion1337.de/api/packages/sorb/npm/
|
|
//rohana.axion1337.de/api/packages/sorb/npm/:_authToken=${GITEA_NPM_TOKEN}
|
|
EOF
|
|
- cd embedded/web
|
|
- npm publish --access public
|