Files
sigpro/.github/workflows/publish.yml
natxocc 23451f04df
Some checks failed
Publish to NPM / publish (release) Has been cancelled
Actualizar .github/workflows/publish.yml
2026-04-15 10:25:27 +02:00

34 lines
978 B
YAML

name: Publish to NPM
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
container:
image: node:20-bullseye
options: >-
--add-host gitea:192.168.1.100
--add-host git.natxocc.com:192.168.1.100
steps:
- name: Forzar resolución y puerto
run: |
# Si Gitea pide el puerto 3000, lo mandamos al 3333 que es el que tienes abierto
git config --global url."http://192.168.1.100:3333/".insteadOf "http://gitea:3000/"
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 }}