Actualizar .github/workflows/publish.yml
This commit is contained in:
20
.github/workflows/publish.yml
vendored
20
.github/workflows/publish.yml
vendored
@@ -7,30 +7,16 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
publish:
|
publish:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
# IMPORTANTE: Usamos Node porque la imagen 'bullseye' SÍ tiene Git instalado
|
|
||||||
container:
|
container:
|
||||||
image: node:20-bullseye
|
image: node:20 # Usamos esta porque npm ya viene dentro
|
||||||
options: --add-host git.natxocc.com:host-gateway
|
options: --network host # ESTO es lo que hace que vea tu red local
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout código
|
- name: Checkout código
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
|
||||||
# Al tener Git en la imagen, esto ya no usará la "REST API" (ZIP)
|
|
||||||
# sino un "git clone" normal, que es mucho más fiable.
|
|
||||||
fetch-depth: 1
|
|
||||||
|
|
||||||
- name: Instalar Bun
|
|
||||||
run: |
|
|
||||||
apt-get update && apt-get install -y curl unzip
|
|
||||||
curl -fsSL https://bun.sh/install | bash
|
|
||||||
# Añadimos Bun al PATH manualmente para esta sesión
|
|
||||||
echo "$HOME/.bun/bin" >> $GITHUB_PATH
|
|
||||||
|
|
||||||
- name: Publicar en NPM
|
- name: Publicar en NPM
|
||||||
run: |
|
run: |
|
||||||
# Ahora que tenemos Bun y el código, publicamos
|
npm install # Instala lo que necesite tu paquete
|
||||||
/root/.bun/bin/bun 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