name: Publish to NPM on: release: types: [published] jobs: publish: runs-on: ubuntu-latest container: image: node:20-bullseye # IMPORTANTE: Conectar a la red interna options: --network gitea_net steps: - name: Configurar Túnel Interno run: | # REDIRECCIÓN MAESTRA: # Cualquier intento de ir a la IP externa puerto 3333 # se redirige al nombre interno 'gitea' puerto 3000 git config --global url."http://gitea:3000/".insteadOf "http://192.168.1.100:3333/" # Configuraciones de seguridad necesarias git config --global --add safe.directory /workspace/natxocc/sigpro git config --global http.sslVerify false - name: Checkout código uses: actions/checkout@v4 with: fetch-depth: 1 - name: Publicar en NPM run: | npm install echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc npm publish --access public env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }}