Actualizar .github/workflows/publicar-paquete.yml
This commit is contained in:
27
.github/workflows/publicar-paquete.yml
vendored
27
.github/workflows/publicar-paquete.yml
vendored
@@ -41,20 +41,17 @@ jobs:
|
|||||||
export PATH="$HOME/.bun/bin:$PATH"
|
export PATH="$HOME/.bun/bin:$PATH"
|
||||||
bun run build
|
bun run build
|
||||||
|
|
||||||
- name: Publicar vía API (CURL Binario)
|
- name: Diagnóstico de API y URLs
|
||||||
run: |
|
run: |
|
||||||
# 1. Crear el paquete .tgz
|
echo "--- 1. Verificando Usuario y Token ---"
|
||||||
npm pack
|
curl -H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
||||||
|
https://git.natxocc.com/api/v1/user
|
||||||
|
|
||||||
# 2. Capturar el nombre del archivo generado
|
echo -e "\n\n--- 2. Verificando Repositorio ---"
|
||||||
TARBALL_NAME=$(ls sigpro-*.tgz | head -n 1)
|
curl -H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
||||||
echo "Subiendo archivo: $TARBALL_NAME"
|
https://git.natxocc.com/api/v1/repos/natxocc/sigpro
|
||||||
|
|
||||||
# 3. Envío binario a la API de Gitea
|
echo -e "\n\n--- 3. Verificando Endpoints de Paquetes ---"
|
||||||
# Importante: Gitea NPM API no acepta formularios (-F),
|
# Probamos la ruta oficial de Gitea para listar paquetes de un propietario
|
||||||
# requiere el archivo directamente en el body (--data-binary)
|
curl -v -H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
||||||
curl -v -X PUT \
|
https://git.natxocc.com/api/packages/natxocc/npm/sigpro
|
||||||
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
|
||||||
-H "Content-Type: application/octet-stream" \
|
|
||||||
--data-binary "@${TARBALL_NAME}" \
|
|
||||||
"https://git.natxocc.com/api/packages/natxocc/npm/"
|
|
||||||
Reference in New Issue
Block a user