File tree Expand file tree Collapse file tree 1 file changed +24
-4
lines changed Expand file tree Collapse file tree 1 file changed +24
-4
lines changed Original file line number Diff line number Diff line change @@ -57,15 +57,35 @@ jobs:
5757 with :
5858 node-version : ${{ matrix.node }}
5959
60+ - name : Set up npm authentication
61+ shell : bash
62+ run : |
63+ echo "//localhost:4873/:_auth=$(echo -n 'dummy:dummy' | base64)" >> ~/.npmrc
64+ echo "email=dummy@gmail.com" >> ~/.npmrc
65+ echo "always-auth=true" >> ~/.npmrc
66+ npx verdaccio@5.32.2 &
67+ for i in {1..30}; do
68+ if curl -sf http://localhost:4873/-/ping > /dev/null; then break; fi
69+ echo "Waiting for Verdaccio to be ready..."; sleep 2;
70+ done
71+ npm config set registry http://localhost:4873
72+
73+ - name : Register user with Verdaccio
74+ shell : bash
75+ run : |
76+ curl -X PUT http://localhost:4873/-/user/org.couchdb.user:dummy \
77+ -H "Content-Type: application/json" \
78+ -d '{
79+ "name": "dummy",
80+ "password": "dummy",
81+ "email": "dummy@gmail.com"
82+ }'
83+
6084 - name : Setup staging npm package
6185 if : ${{ github.event.inputs.package_url != '' }}
6286 run : |
6387 echo 'Publishing tar.gz to local registry'
6488 curl -o staging_package.tgz "$PACKAGE_URL"
65- npm install verdaccio@5.32.2 -g
66- verdaccio &
67- npm config set registry http://localhost:4873
68- npm install -g npm-cli-adduser && npm-cli-adduser -u dummy -p dummy -e dummy@gmail.com -r http://localhost:4873
6989 npm publish staging_package.tgz --registry http://localhost:4873/
7090 shell : bash
7191
You can’t perform that action at this time.
0 commit comments