Skip to content

Commit 04c641f

Browse files
committed
improve CI
1 parent 4e904cb commit 04c641f

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

.github/workflows/main.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
submodules: true
3030

3131
- name: Install node
32-
uses: actions/setup-node@v3
32+
uses: actions/setup-node@v4
3333
with:
3434
registry-url: 'https://registry.npmjs.org'
3535
scope: '@zondax'

.github/workflows/publish.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: 'Publish packages'
33
on:
44
release:
55
types:
6+
- created
67
- published
78
- edited
89
tags:
@@ -27,9 +28,11 @@ jobs:
2728
steps:
2829
- name: Checkout
2930
uses: actions/checkout@v4
31+
with:
32+
submodules: true
3033

3134
- name: Install node
32-
uses: actions/setup-node@v3
35+
uses: actions/setup-node@v4
3336
with:
3437
registry-url: 'https://registry.npmjs.org'
3538
scope: '@zondax'
@@ -44,13 +47,18 @@ jobs:
4447
id: get_version
4548
uses: battila7/get-version-action@v2
4649

50+
- name: Show version
51+
run: echo ${{ steps.get_version.outputs.version }}
52+
4753
- name: Update tag
4854
run: |
49-
echo Publishing as ${{ steps.get_version.outputs.version }}
5055
npm --allow-same-version --no-git-tag-version version ${{ steps.get_version.outputs.version }}
5156
5257
- name: Publish package
5358
env:
5459
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN_PUBLISH_AUTO }}
60+
NODE_REPO_SERVER: 'https://registry.npmjs.org'
5561
run: |
62+
npm config set registry $NODE_REPO_SERVER
63+
npm config set //registry.npmjs.org/:_authToken $NODE_AUTH_TOKEN
5664
npm publish

0 commit comments

Comments
 (0)