Actualizar .github/workflows/publish.yml
This commit is contained in:
8
.github/workflows/publish.yml
vendored
8
.github/workflows/publish.yml
vendored
@@ -7,9 +7,10 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
publish:
|
publish:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
# Usamos la imagen oficial de Bun para que el entorno sea exacto al que usas al programar
|
|
||||||
container:
|
container:
|
||||||
image: oven/bun:latest
|
image: oven/bun:latest
|
||||||
|
# ESTO SOLUCIONA EL ERROR DE RED:
|
||||||
|
options: --network host
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout código
|
- name: Checkout código
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -17,13 +18,10 @@ jobs:
|
|||||||
- name: Instalar dependencias
|
- name: Instalar dependencias
|
||||||
run: bun install
|
run: bun install
|
||||||
|
|
||||||
# Opcional: si tienes un script de build (ej: para generar archivos .js desde .ts)
|
|
||||||
# - name: Build
|
|
||||||
# run: bun run build
|
|
||||||
|
|
||||||
- name: Publicar en NPM
|
- name: Publicar en NPM
|
||||||
run: |
|
run: |
|
||||||
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
|
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
|
||||||
|
# Usamos el publish de bun o npm, ambos funcionan si las dependencias están listas
|
||||||
npm publish --access public
|
npm publish --access public
|
||||||
env:
|
env:
|
||||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
Reference in New Issue
Block a user