66 steps :
77 - name : Start verdaccio
88 run : |
9- npx verdaccio@5.25.0 &
9+ npx verdaccio@6.0.5 &
1010 while ! nc -z localhost 4873; do
1111 echo "Verdaccio not running yet"
1212 sleep 1
@@ -15,17 +15,22 @@ runs:
1515 # Run your commands after verdaccio is up and running
1616 echo "Verdaccio is up and running, proceeding with the script..."
1717 shell : bash
18- - name : Install and run npm-cli-login
18+ - name : Authenticate with Verdaccio
1919 shell : bash
2020 env :
2121 NPM_REGISTRY : http://localhost:4873/
2222 NPM_USER : verdaccio
2323 NPM_PASS : verdaccio
2424 NPM_EMAIL : verdaccio@amplify.js
2525 run : |
26- npm i -g npm-cli-adduser
27- npm-cli-adduser
28- sleep 1
26+ TOKEN=$(curl -X PUT \
27+ -H "Content-Type: application/json" \
28+ -d "{\"name\": \"$NPM_USER\", \"password\": \"$NPM_PASS\"}" \
29+ $NPM_REGISTRY-/user/org.couchdb.user:$NPM_USER | jq -r '.token')
30+
31+ echo "registry=$NPM_REGISTRY
32+ //localhost:4873/:_authToken=$TOKEN" > ~/.npmrc
33+
2934 - name : Configure registry and git
3035 shell : bash
3136 working-directory : ./amplify-js
4853 scripts/retry-yarn-script.sh -s publish:verdaccio -n 5 -r true
4954 yarn info aws-amplify@unstable description
5055 npm info aws-amplify@unstable version
56+ - name : Upload artifact
57+ uses : actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
58+ if : failure()
59+ with :
60+ name : ${{ inputs.test_name }}-npm-log
61+ if-no-files-found : ignore
62+ path : /Users/runner/.npm/_logs/
63+ retention-days : 3
64+ overwrite : true
0 commit comments