فهرست منبع

chore: Publish and install fix 5

Michael Bromley 2 سال پیش
والد
کامیت
d885adb511
1فایلهای تغییر یافته به همراه4 افزوده شده و 1 حذف شده
  1. 4 1
      .github/workflows/publish_and_install.yml

+ 4 - 1
.github/workflows/publish_and_install.yml

@@ -30,14 +30,17 @@ jobs:
         node-version: ${{ matrix.node-version }}
         node-version: ${{ matrix.node-version }}
     - name: Install Verdaccio
     - name: Install Verdaccio
       run: |
       run: |
+        apt-get update
+        apt-get install jq
         npm install -g verdaccio
         npm install -g verdaccio
         npm install -g wait-on
         npm install -g wait-on
         nohup verdaccio &
         nohup verdaccio &
         wait-on http://localhost:4873
         wait-on http://localhost:4873
-        TOKEN=$(curl -XPUT \
+        TOKEN_RES=$(curl -XPUT \
           -H "Content-type: application/json" \
           -H "Content-type: application/json" \
           -d '{ "name": "test", "password": "test" }' \
           -d '{ "name": "test", "password": "test" }' \
           'http://localhost:4873/-/user/org.couchdb.user:test')
           'http://localhost:4873/-/user/org.couchdb.user:test')
+        TOKEN=$(echo "$TOKEN_RES" | jq -r '.token')
         npm set registry "http://localhost:4873"
         npm set registry "http://localhost:4873"
         npm set //localhost:4873/:_authToken $TOKEN
         npm set //localhost:4873/:_authToken $TOKEN
     - name: Windows dependencies
     - name: Windows dependencies