Actualizar .github/workflows/publish.yml
This commit is contained in:
16
.github/workflows/publish.yml
vendored
16
.github/workflows/publish.yml
vendored
@@ -8,15 +8,25 @@ jobs:
|
|||||||
publish:
|
publish:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: node:20 # Usamos esta porque npm ya viene dentro
|
# Usamos una imagen que SÍ tenga GIT para que no intente bajar el ZIP
|
||||||
options: --network host # ESTO es lo que hace que vea tu red local
|
image: alpine:latest
|
||||||
|
options: --add-host git.natxocc.com:host-gateway
|
||||||
steps:
|
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
|
- name: Checkout código
|
||||||
uses: actions/checkout@v4
|
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
|
- name: Publicar en NPM
|
||||||
run: |
|
run: |
|
||||||
npm install # Instala lo que necesite tu paquete
|
npm install
|
||||||
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
|
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
|
||||||
npm publish --access public
|
npm publish --access public
|
||||||
env:
|
env:
|
||||||
|
|||||||
Reference in New Issue
Block a user