0f7688ac5e
- Aggiorna checkout v4→v6, setup-python v5→v5.2.0, setup-android v3→v4 - Aggiorna upload-artifact v3→v4, docker/login-action v3→v4 - Aggiunge needs su auto-release in tutti gli esempi (fix esecuzione parallela) - Aggiunge token esplicito nel checkout come workaround bug Gitea #31900 - Aggiunge job dependency-outdated mancante in libreria-npm/maintenance.yml - Aggiorna schedule: libreria-npm mercoledì 02:00, microservizio lunedì 02:00 - Migra tutti i riferimenti da gitea.com/Punga78 a gitea.pzetatouch.it/devops Fixes #1 @3h
55 lines
1.3 KiB
YAML
55 lines
1.3 KiB
YAML
name: Publish npm Package
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
node-version:
|
|
type: string
|
|
default: '22.17'
|
|
|
|
jobs:
|
|
npm-publish:
|
|
runs-on: ubuntu-latest
|
|
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 || '22.17' }}
|
|
|
|
- name: Cache npm
|
|
uses: https://gitea.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
|