Actualizar .github/workflows/publish-npm.yml
This commit is contained in:
38
.github/workflows/publish-npm.yml
vendored
Normal file
38
.github/workflows/publish-npm.yml
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
name: Publish to NPM (Manual)
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: 'Versión a publicar (ej: 1.2.20)'
|
||||
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.git source
|
||||
cd source
|
||||
git checkout main
|
||||
|
||||
- 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 }}
|
||||
Reference in New Issue
Block a user