4 Commits
Author SHA1 Message Date
LucaZanni 6aca13b460 🐛 fix(capacitor-android): il wrapper gradle riceve il bit che Windows non gli da
- Aggiunto lo step "Rendi eseguibile gradlew" prima dei build APK e AAB
- Allineati capacitor-android.yml e la variante GitHub

Fixes #6 @1h30m
2026-08-27 18:47:34 +02:00
LucaZanni c1a4b2723f ✨ feat(capacitor-android): inietta versionName e versionCode da package.json
- Nuovo step "Inject Android version" dopo il sync Capacitor: riscrive versionName e versionCode in android/app/build.gradle prima della build
- versionCode derivato come major*10000 + minor*100 + patch, monotono crescente fra release; pre-release e build metadata scartati dal calcolo ma mantenuti nel versionName
- Nuovo input opzionale version-code per forzare un valore esplicito
- Supporto Groovy e Kotlin DSL; fallisce con diagnostica se la piattaforma manca, la versione non e' semver, minor/patch superano 99 o l'iniezione non produce il valore atteso
- Allineata la variante -github, corpo dello step identico

Fixes #5 @1h30m
2026-08-11 08:51:01 +02:00
LucaZanni c0524722e4 🔧 fix(ci): allinea a PZeta_Touch il registry npm dei workflow riusabili
- .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
2026-08-04 10:31:04 +02:00
LucaZanni dae2a74437 ✨ feat(ci): aggiungi l'input working-directory ai reusable workflow Node
- quality-gates, dependency-check, dependency-outdated, npm-publish e
  auto-release accettano ora working-directory (default "."), applicato via
  defaults.run a livello di job: copre tutti gli step run senza toccare gli
  step uses, che devono restare sulla root
- Allineate le varianti -github dei cinque workflow
- Sblocca i repo dove package.json non e' in root (pzeta-calendar in
  typescript/, pzeta-king in server/), che finora dovevano rinunciare ai
  template e reinlineare i job, perdendo la working-directory a ogni
  riallineamento
- Retrocompatibile: con l'input omesso il comportamento resta identico

refs #4
2026-08-01 19:30:03 +02:00
14 changed files with 280 additions and 24 deletions
+8
View File
@@ -2,10 +2,18 @@ name: Auto Release
on:
workflow_call:
inputs:
working-directory:
description: 'Cartella che contiene package.json, relativa alla root del repo. Default: la root.'
type: string
default: '.'
jobs:
auto-release:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ inputs.working-directory || '.' }}
steps:
- name: Checkout
uses: https://github.com/actions/checkout@v6
+8
View File
@@ -2,10 +2,18 @@ name: Auto Release
on:
workflow_call:
inputs:
working-directory:
description: 'Cartella che contiene package.json, relativa alla root del repo. Default: la root.'
type: string
default: '.'
jobs:
auto-release:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ inputs.working-directory || '.' }}
steps:
- name: Checkout
uses: https://gitea.com/actions/checkout@v6
+94 -2
View File
@@ -20,6 +20,10 @@ on:
description: 'apk (sideload/test) | aab (Play Store)'
type: string
default: 'apk'
version-code:
description: 'versionCode Android esplicito. Se vuoto viene derivato da package.json: major*10000 + minor*100 + patch'
type: string
default: ''
secrets:
NPM_TOKEN:
required: false
@@ -75,8 +79,8 @@ jobs:
- 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
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: Read app info from package.json
id: app-info
@@ -96,6 +100,87 @@ jobs:
- name: Sync Capacitor
run: npx cap sync android
# La piattaforma Android puo essere generata da 'cap add' (default Capacitor:
# versionName "1.0", versionCode 1) oppure versionata nel repo consumer.
# In entrambi i casi la versione pubblicata deve derivare da package.json,
# unica fonte di verita, altrimenti l'APK/AAB dichiara una versione diversa
# da quella del tag e Play Store rifiuta upload con versionCode non crescente.
- name: Inject Android version
id: android-version
env:
PKG_VERSION: ${{ steps.app-info.outputs.version }}
VERSION_CODE_OVERRIDE: ${{ inputs.version-code }}
run: |
set -euo pipefail
if [ -f android/app/build.gradle ]; then
GRADLE_FILE="android/app/build.gradle"
KTS=0
elif [ -f android/app/build.gradle.kts ]; then
GRADLE_FILE="android/app/build.gradle.kts"
KTS=1
else
echo "::error::Nessun build.gradle in android/app/ — piattaforma Android non generata"
exit 1
fi
VERSION_NAME="$PKG_VERSION"
if [ -n "$VERSION_CODE_OVERRIDE" ]; then
VERSION_CODE="$VERSION_CODE_OVERRIDE"
else
CORE="${PKG_VERSION%%-*}" # scarta il pre-release: 1.2.3-beta.1 -> 1.2.3
CORE="${CORE%%+*}" # scarta il build metadata: 1.2.3+abc -> 1.2.3
MAJOR="$(echo "$CORE" | cut -d. -f1)"
MINOR="$(echo "$CORE" | cut -d. -f2)"
PATCH="$(echo "$CORE" | cut -d. -f3)"
MINOR="${MINOR:-0}"
PATCH="${PATCH:-0}"
case "${MAJOR}${MINOR}${PATCH}" in
''|*[!0-9]*)
echo "::error::Versione package.json non semver: '$PKG_VERSION'. Passare version-code esplicito."
exit 1
;;
esac
if [ "$MINOR" -gt 99 ] || [ "$PATCH" -gt 99 ]; then
echo "::error::minor/patch > 99 non rappresentabili ('$PKG_VERSION'). Passare version-code esplicito."
exit 1
fi
VERSION_CODE=$(( MAJOR * 10000 + MINOR * 100 + PATCH ))
fi
if [ "$KTS" -eq 1 ]; then
sed -i -E "s/versionCode[[:space:]]*=[[:space:]]*[0-9]+/versionCode = ${VERSION_CODE}/" "$GRADLE_FILE"
sed -i -E "s/versionName[[:space:]]*=[[:space:]]*\"[^\"]*\"/versionName = \"${VERSION_NAME}\"/" "$GRADLE_FILE"
else
sed -i -E "s/versionCode[[:space:]]+[0-9]+/versionCode ${VERSION_CODE}/" "$GRADLE_FILE"
sed -i -E "s/versionName[[:space:]]+\"[^\"]*\"/versionName \"${VERSION_NAME}\"/" "$GRADLE_FILE"
fi
# Il sed silenzioso e' peggio di un fallimento: senza questa verifica una
# variazione del template Capacitor produrrebbe build con versione sbagliata.
# Si confrontano i valori estratti, non si rilegge il file con una regex
# costruita sulla versione: '+' e '.' di un semver sono metacaratteri ERE.
# '|| true': senza, pipefail farebbe uscire lo step su un file privo di
# versionCode/versionName, perdendo la diagnostica del blocco sottostante.
ACTUAL_CODE="$(grep -oE 'versionCode[[:space:]]*=?[[:space:]]*[0-9]+' "$GRADLE_FILE" | head -1 | grep -oE '[0-9]+$' || true)"
ACTUAL_NAME="$(grep -oE 'versionName[[:space:]]*=?[[:space:]]*"[^"]*"' "$GRADLE_FILE" | head -1 | cut -d'"' -f2 || true)"
if [ "$ACTUAL_CODE" != "$VERSION_CODE" ] || [ "$ACTUAL_NAME" != "$VERSION_NAME" ]; then
echo "::error::Iniezione versione fallita in $GRADLE_FILE"
echo " atteso: versionName='${VERSION_NAME}' versionCode=${VERSION_CODE}"
echo " trovato: versionName='${ACTUAL_NAME}' versionCode=${ACTUAL_CODE}"
grep -nE 'versionCode|versionName' "$GRADLE_FILE" || true
exit 1
fi
echo "version-name=${VERSION_NAME}" >> $GITHUB_OUTPUT
echo "version-code=${VERSION_CODE}" >> $GITHUB_OUTPUT
echo "Android: versionName=${VERSION_NAME} versionCode=${VERSION_CODE} ($GRADLE_FILE)"
- name: Setup google-services.json
if: secrets.GOOGLE_SERVICES_JSON != ''
run: echo '${{ secrets.GOOGLE_SERVICES_JSON }}' > android/app/google-services.json
@@ -104,6 +189,13 @@ jobs:
if: inputs.build-type == 'release'
run: echo '${{ secrets.KEYSTORE_BASE64 }}' | base64 -d > android/app/keystore.jks
# Il wrapper arriva dal repo senza bit di esecuzione quando il progetto e'
# committato da Windows: git registra mode 100644 e il checkout sul runner
# Linux produce "./gradlew: Permission denied". Il chmod qui vale per ogni
# repo Capacitor, cosi' il difetto non va rincorso uno per uno.
- name: Rendi eseguibile gradlew
run: chmod +x android/gradlew
- name: Build Android (APK)
if: inputs.output-format == 'apk'
working-directory: android
+94 -2
View File
@@ -20,6 +20,10 @@ on:
description: 'apk (sideload/test) | aab (Play Store)'
type: string
default: 'apk'
version-code:
description: 'versionCode Android esplicito. Se vuoto viene derivato da package.json: major*10000 + minor*100 + patch'
type: string
default: ''
secrets:
NPM_TOKEN:
required: false
@@ -75,8 +79,8 @@ jobs:
- 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
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: Read app info from package.json
id: app-info
@@ -96,6 +100,87 @@ jobs:
- name: Sync Capacitor
run: npx cap sync android
# La piattaforma Android puo essere generata da 'cap add' (default Capacitor:
# versionName "1.0", versionCode 1) oppure versionata nel repo consumer.
# In entrambi i casi la versione pubblicata deve derivare da package.json,
# unica fonte di verita, altrimenti l'APK/AAB dichiara una versione diversa
# da quella del tag e Play Store rifiuta upload con versionCode non crescente.
- name: Inject Android version
id: android-version
env:
PKG_VERSION: ${{ steps.app-info.outputs.version }}
VERSION_CODE_OVERRIDE: ${{ inputs.version-code }}
run: |
set -euo pipefail
if [ -f android/app/build.gradle ]; then
GRADLE_FILE="android/app/build.gradle"
KTS=0
elif [ -f android/app/build.gradle.kts ]; then
GRADLE_FILE="android/app/build.gradle.kts"
KTS=1
else
echo "::error::Nessun build.gradle in android/app/ — piattaforma Android non generata"
exit 1
fi
VERSION_NAME="$PKG_VERSION"
if [ -n "$VERSION_CODE_OVERRIDE" ]; then
VERSION_CODE="$VERSION_CODE_OVERRIDE"
else
CORE="${PKG_VERSION%%-*}" # scarta il pre-release: 1.2.3-beta.1 -> 1.2.3
CORE="${CORE%%+*}" # scarta il build metadata: 1.2.3+abc -> 1.2.3
MAJOR="$(echo "$CORE" | cut -d. -f1)"
MINOR="$(echo "$CORE" | cut -d. -f2)"
PATCH="$(echo "$CORE" | cut -d. -f3)"
MINOR="${MINOR:-0}"
PATCH="${PATCH:-0}"
case "${MAJOR}${MINOR}${PATCH}" in
''|*[!0-9]*)
echo "::error::Versione package.json non semver: '$PKG_VERSION'. Passare version-code esplicito."
exit 1
;;
esac
if [ "$MINOR" -gt 99 ] || [ "$PATCH" -gt 99 ]; then
echo "::error::minor/patch > 99 non rappresentabili ('$PKG_VERSION'). Passare version-code esplicito."
exit 1
fi
VERSION_CODE=$(( MAJOR * 10000 + MINOR * 100 + PATCH ))
fi
if [ "$KTS" -eq 1 ]; then
sed -i -E "s/versionCode[[:space:]]*=[[:space:]]*[0-9]+/versionCode = ${VERSION_CODE}/" "$GRADLE_FILE"
sed -i -E "s/versionName[[:space:]]*=[[:space:]]*\"[^\"]*\"/versionName = \"${VERSION_NAME}\"/" "$GRADLE_FILE"
else
sed -i -E "s/versionCode[[:space:]]+[0-9]+/versionCode ${VERSION_CODE}/" "$GRADLE_FILE"
sed -i -E "s/versionName[[:space:]]+\"[^\"]*\"/versionName \"${VERSION_NAME}\"/" "$GRADLE_FILE"
fi
# Il sed silenzioso e' peggio di un fallimento: senza questa verifica una
# variazione del template Capacitor produrrebbe build con versione sbagliata.
# Si confrontano i valori estratti, non si rilegge il file con una regex
# costruita sulla versione: '+' e '.' di un semver sono metacaratteri ERE.
# '|| true': senza, pipefail farebbe uscire lo step su un file privo di
# versionCode/versionName, perdendo la diagnostica del blocco sottostante.
ACTUAL_CODE="$(grep -oE 'versionCode[[:space:]]*=?[[:space:]]*[0-9]+' "$GRADLE_FILE" | head -1 | grep -oE '[0-9]+$' || true)"
ACTUAL_NAME="$(grep -oE 'versionName[[:space:]]*=?[[:space:]]*"[^"]*"' "$GRADLE_FILE" | head -1 | cut -d'"' -f2 || true)"
if [ "$ACTUAL_CODE" != "$VERSION_CODE" ] || [ "$ACTUAL_NAME" != "$VERSION_NAME" ]; then
echo "::error::Iniezione versione fallita in $GRADLE_FILE"
echo " atteso: versionName='${VERSION_NAME}' versionCode=${VERSION_CODE}"
echo " trovato: versionName='${ACTUAL_NAME}' versionCode=${ACTUAL_CODE}"
grep -nE 'versionCode|versionName' "$GRADLE_FILE" || true
exit 1
fi
echo "version-name=${VERSION_NAME}" >> $GITHUB_OUTPUT
echo "version-code=${VERSION_CODE}" >> $GITHUB_OUTPUT
echo "Android: versionName=${VERSION_NAME} versionCode=${VERSION_CODE} ($GRADLE_FILE)"
- name: Setup google-services.json
if: secrets.GOOGLE_SERVICES_JSON != ''
run: echo '${{ secrets.GOOGLE_SERVICES_JSON }}' > android/app/google-services.json
@@ -104,6 +189,13 @@ jobs:
if: inputs.build-type == 'release'
run: echo '${{ secrets.KEYSTORE_BASE64 }}' | base64 -d > android/app/keystore.jks
# Il wrapper arriva dal repo senza bit di esecuzione quando il progetto e'
# committato da Windows: git registra mode 100644 e il checkout sul runner
# Linux produce "./gradlew: Permission denied". Il chmod qui vale per ogni
# repo Capacitor, cosi' il difetto non va rincorso uno per uno.
- name: Rendi eseguibile gradlew
run: chmod +x android/gradlew
- name: Build Android (APK)
if: inputs.output-format == 'apk'
working-directory: android
+9 -2
View File
@@ -3,6 +3,10 @@ name: Dependency Audit
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'
@@ -11,6 +15,9 @@ on:
jobs:
dependency-audit:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ inputs.working-directory || '.' }}
steps:
- name: Checkout
uses: https://github.com/actions/checkout@v6
@@ -30,8 +37,8 @@ jobs:
- 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
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
+9 -2
View File
@@ -3,6 +3,10 @@ name: Dependency Audit
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'
@@ -11,6 +15,9 @@ on:
jobs:
dependency-audit:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ inputs.working-directory || '.' }}
steps:
- name: Checkout
uses: https://gitea.com/actions/checkout@v6
@@ -30,8 +37,8 @@ jobs:
- 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
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
@@ -3,6 +3,10 @@ name: Dependency Outdated
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'
@@ -11,6 +15,9 @@ on:
jobs:
dependency-outdated:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ inputs.working-directory || '.' }}
steps:
- name: Checkout
uses: https://github.com/actions/checkout@v6
@@ -30,8 +37,8 @@ jobs:
- 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
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
+9 -2
View File
@@ -3,6 +3,10 @@ name: Dependency Outdated
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'
@@ -11,6 +15,9 @@ on:
jobs:
dependency-outdated:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ inputs.working-directory || '.' }}
steps:
- name: Checkout
uses: https://gitea.com/actions/checkout@v6
@@ -30,8 +37,8 @@ jobs:
- 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
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
+2 -2
View File
@@ -39,8 +39,8 @@ jobs:
- 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
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
+2 -2
View File
@@ -39,8 +39,8 @@ jobs:
- 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
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
+9 -2
View File
@@ -3,6 +3,10 @@ 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'
@@ -10,6 +14,9 @@ on:
jobs:
npm-publish:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ inputs.working-directory || '.' }}
steps:
- name: Checkout
uses: https://github.com/actions/checkout@v6
@@ -29,8 +36,8 @@ jobs:
- 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
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
+9 -2
View File
@@ -3,6 +3,10 @@ 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'
@@ -10,6 +14,9 @@ on:
jobs:
npm-publish:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ inputs.working-directory || '.' }}
steps:
- name: Checkout
uses: https://gitea.com/actions/checkout@v6
@@ -29,8 +36,8 @@ jobs:
- 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
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
+9 -2
View File
@@ -3,6 +3,10 @@ name: Quality Gates
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'
@@ -13,6 +17,9 @@ on:
jobs:
quality-gates:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ inputs.working-directory || '.' }}
steps:
- name: Checkout
uses: https://github.com/actions/checkout@v6
@@ -36,8 +43,8 @@ jobs:
- 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
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: Check outdated packages
run: npm outdated || true
+9 -2
View File
@@ -3,6 +3,10 @@ name: Quality Gates
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'
@@ -13,6 +17,9 @@ on:
jobs:
quality-gates:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ inputs.working-directory || '.' }}
steps:
- name: Checkout
uses: https://gitea.com/actions/checkout@v6
@@ -36,8 +43,8 @@ jobs:
- 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
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: Check outdated packages
run: npm outdated || true