- .gitea/workflows/*.yml: il registry @pzeta scritto in ~/.npmrc passa da `pzeta_touch` a `PZeta_Touch` (12 file, 24 righe). E' la stessa causa dei Dockerfile: i package-lock.json della flotta risolvono i tarball su `.../api/packages/PZeta_Touch/npm/`, npm confronta gli URL come stringhe e con la grafia minuscola tratta il pacchetto come tarball remota (EALLOWREMOTE da npm 11) e non applica il _authToken - e' il punto di massima leva: quality-gates.yml e docker-release.yml sono chiamati via `uses:` da 51 repo `node-*` ed eseguono `npm ci` sul runner PRIMA di `docker build`, quindi la release si ferma li' anche con il Dockerfile gia' corretto - il REGISTRY delle immagini (`gitea.pzetatouch.it/pzeta_touch`) resta minuscolo: i nomi dei repository Docker devono esserlo, ed e' la grafia usata dai defaults di flux-repo refs PZeta_Touch/flux-repo#129 @45m
62 lines
1.6 KiB
YAML
62 lines
1.6 KiB
YAML
name: Publish npm Package
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
working-directory:
|
|
description: 'Cartella che contiene package.json, relativa alla root del repo. Default: la root.'
|
|
type: string
|
|
default: '.'
|
|
node-version:
|
|
type: string
|
|
default: '24.16.0'
|
|
|
|
jobs:
|
|
npm-publish:
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: ${{ inputs.working-directory || '.' }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: https://gitea.com/actions/checkout@v6
|
|
|
|
- name: Setup Node.js
|
|
uses: https://gitea.com/actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ inputs.node-version || '24.16.0' }}
|
|
|
|
- name: Cache npm
|
|
uses: https://github.com/actions/cache@v4
|
|
with:
|
|
path: ~/.npm
|
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-node-
|
|
|
|
- name: Configure npm private registry
|
|
run: |
|
|
echo "@pzeta:registry=https://gitea.pzetatouch.it/api/packages/PZeta_Touch/npm/" >> ~/.npmrc
|
|
echo "//gitea.pzetatouch.it/api/packages/PZeta_Touch/npm/:_authToken=${{ secrets.NPM_TOKEN }}" >> ~/.npmrc
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Lint
|
|
run: npm run lint:check
|
|
|
|
- name: Type check
|
|
run: npm run typecheck
|
|
|
|
- name: Format check
|
|
run: npm run format:check
|
|
|
|
- name: Build
|
|
run: npm run build
|
|
|
|
- name: Test
|
|
run: npm run test
|
|
|
|
- name: Publish
|
|
run: npm publish
|