Skip to content

Commit d1378e1

Browse files
committed
ci: npm pkg fix
1 parent 9ac703e commit d1378e1

3 files changed

Lines changed: 15 additions & 14 deletions

File tree

.github/publish_slim_package.sh

Lines changed: 0 additions & 10 deletions
This file was deleted.

.github/workflows/cd.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@ jobs:
5151
run: bash .github/prepare_slim_package.sh
5252

5353
- name: Publish slim package
54-
run: bash .github/publish_slim_package.sh
55-
env:
56-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
54+
run: |
55+
# Ensure npm 11.5.1 or later is installed
56+
npm install -g npm@latest
57+
58+
cd slim
59+
60+
# Extract to PRE_RELEASE_TAG the tag in the version field of the package json, or the empty string if it doesn't exist
61+
PRE_RELEASE_TAG=$(jq -r '.version | if test("-") then capture("^[0-9]+\\.[0-9]+\\.[0-9]+-(?<tag>[a-zA-Z-]+)") | .tag else "" end' package.json)
62+
63+
# Publish the package to a custom tag for slim versions
64+
npm publish --access public --tag $PRE_RELEASE_TAG

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
"name": "@venusprotocol/venus-protocol",
33
"version": "10.1.0-dev.10",
44
"description": "The Venus Money Market",
5-
"repository": "git@github.com:VenusProtocol/venus-protocol.git",
5+
"repository": {
6+
"type": "git",
7+
"url": "git+ssh://git@github.com/VenusProtocol/venus-protocol.git"
8+
},
69
"author": "Venus",
710
"license": "BSD-3-Clause",
811
"engines": {

0 commit comments

Comments
 (0)