Update last version

This commit is contained in:
2026-04-30 00:27:55 +02:00
parent bbbf44a04e
commit d185402567
8 changed files with 259 additions and 112 deletions

42
.github/workflows/publish-gitea.yml vendored Normal file
View File

@@ -0,0 +1,42 @@
name: Publicar Paquete SigProGrid (NPM)
on:
workflow_dispatch:
push:
tags:
- 'v*'
jobs:
publish:
runs-on: ubuntu-latest
container:
image: node:20-bullseye
options: >-
--dns 192.168.1.1
--add-host git.natxocc.com:host-gateway
--add-host gitea:host-gateway
steps:
- name: Checkout código
uses: actions/checkout@v4
env:
GIT_CONFIG_PARAMETERS: "'url.https://git.natxocc.com/.insteadOf=http://gitea:3000/'"
- name: Instalar Bun
run: |
curl -fsSL https://bun.sh/install | bash
echo "$HOME/.bun/bin" >> $GITHUB_PATH
- name: Instalar y Build
run: |
export PATH="$HOME/.bun/bin:$PATH"
git config --global url."https://git.natxocc.com/".insteadOf "http://gitea:3000/"
bun install
bun run build
- name: Configurar Registro y Publicar
run: |
export PATH="$HOME/.bun/bin:$PATH"
REGISTRY="git.natxocc.com/api/packages/natxocc/npm/"
echo "//${REGISTRY}:_authToken=${{ secrets.PACK_TOKEN }}" > ~/.npmrc
npm publish --registry "https://${REGISTRY}" --userconfig ~/.npmrc

42
.github/workflows/publish.yml vendored Normal file
View File

@@ -0,0 +1,42 @@
name: Publish to NPM (Manual)
on:
workflow_dispatch:
inputs:
version:
description: 'Versión a publicar (ej: 1.0.0)'
required: true
jobs:
publish:
runs-on: ubuntu-latest
container:
image: node:20-bullseye
options: >-
--dns 192.168.1.1
--add-host git.natxocc.com:host-gateway
--add-host gitea:host-gateway
steps:
- name: Clone source from Gitea
run: |
git clone https://git.natxocc.com/natxocc/sigpro-grid.git source
cd source
git checkout main
- name: Configurar Git para dependencias
run: |
git config --global url."https://git.natxocc.com/".insteadOf "http://gitea:3000/"
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Install and publish
run: |
cd source
bun install
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
npm publish --access public
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

22
.github/workflows/unpublish.yml vendored Normal file
View File

@@ -0,0 +1,22 @@
name: Delete npm version
on:
workflow_dispatch:
inputs:
version:
description: 'Versión a eliminar'
required: true
jobs:
delete:
runs-on: ubuntu-latest
steps:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
- name: Unpublish version
run: npm unpublish sigpro-grid@${{ github.event.inputs.version }} --force
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}