Files
sigpro/.github/workflows/publish.yml

33 lines
914 B
YAML

name: Publish to NPM
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
container:
# Usamos una imagen que SÍ tenga GIT para que no intente bajar el ZIP
image: alpine:latest
options: --add-host git.natxocc.com:host-gateway
steps:
- name: Preparar Entorno
run: |
apk add --no-cache git nodejs npm curl
# Esto instala git y npm dentro de la burbuja temporal
- name: Checkout código
uses: actions/checkout@v4
with:
# Al haber instalado 'git' arriba, ahora usará 'git clone'
# y respetará el dominio git.natxocc.com
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 }}