Skip to content

Commit 19cbd09

Browse files
committed
.
1 parent 51526a2 commit 19cbd09

File tree

1 file changed

+22
-6
lines changed

1 file changed

+22
-6
lines changed

.github/workflows/npm-publish.yml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,28 @@ jobs:
1313
- uses: actions/checkout@v3
1414
- uses: actions/setup-node@v3
1515
with:
16-
node-version: '20.x' # Actualización de la versión de Node.js
16+
node-version: '20.x'
1717
registry-url: 'https://registry.npmjs.org/'
18-
- run: npm config list
19-
- run: npm whoami
20-
- run: npm install
21-
- run: npm test
22-
- run: npm publish
18+
19+
# Agregamos NODE_AUTH_TOKEN a todos los pasos que interactúan con npm
20+
- name: Debug npm configuration
21+
run: npm config list
22+
env:
23+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
24+
25+
- name: Verify npm authentication
26+
run: npm whoami
27+
env:
28+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
29+
30+
# Usamos 'npm ci' en lugar de 'npm install' para una instalación más consistente
31+
- name: Install dependencies
32+
run: npm ci
33+
34+
- name: Run tests
35+
run: npm test
36+
37+
- name: Publish to npm
38+
run: npm publish
2339
env:
2440
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)