Browse Source

chore: Attempt to get publish & install workflow working again

The `npm-auth-to-token` dependency is probably breaking. It has no
readme or repo link: https://www.npmjs.com/package/npm-auth-to-token
and has not been updated for 6 years.

The issue is discussed here: https://github.com/ethereumjs/ethereumjs-monorepo/issues/1537
and I am attempting the fix as seen here: https://github.com/ethereumjs/ethereumjs-monorepo/pull/1579/files#diff-02c8f04118065b423b5b599fe96dc405107c1a84c7840d9ec3b04627021aef69
Michael Bromley 2 years ago
parent
commit
1b2cc04211
1 changed files with 6 additions and 2 deletions
  1. 6 2
      .github/workflows/publish_and_install.yml

+ 6 - 2
.github/workflows/publish_and_install.yml

@@ -33,12 +33,16 @@ jobs:
         npm install -g verdaccio
         npm install -g verdaccio-auth-memory
         npm install -g verdaccio-memory
-        npm install -g npm-auth-to-token@1.0.0
         tmp_registry_log=`mktemp`
         mkdir -p $HOME/.config/verdaccio
         cp -v ./.github/workflows/verdaccio/config.yaml $HOME/.config/verdaccio/config.yaml
         nohup verdaccio --config $HOME/.config/verdaccio/config.yaml &>$tmp_registry_log &
-        npm-auth-to-token -u test -p test -e test@test.com -r http://0.0.0.0:4873
+        TOKEN=$(curl -XPUT \
+          -H "Content-type: application/json" \
+          -d '{ "name": "test", "password": "test" }' \
+          'http://localhost:4873/-/user/org.couchdb.user:test')
+        npm set registry "http://localhost:4873"
+        npm set //localhost:4873/:_authToken $TOKEN
     - name: Windows dependencies
       if: matrix.os == 'windows-latest'
       run: npm install -g @angular/cli