File tree Expand file tree Collapse file tree 1 file changed +20
-5
lines changed Expand file tree Collapse file tree 1 file changed +20
-5
lines changed Original file line number Diff line number Diff line change @@ -57,18 +57,33 @@ jobs:
57
57
with :
58
58
node-version : ${{ matrix.node }}
59
59
60
- - name : Setup staging npm package
61
- if : ${{ github.event.inputs.package_url != '' }}
60
+ - name : Register user with Verdaccio
62
61
run : |
63
- echo 'Publishing tar.gz to local registry'
64
- curl -o staging_package.tgz "$PACKAGE_URL"
62
+ curl -X PUT http://localhost:4873/-/user/org.couchdb.user:dummy \
63
+ -H "Content-Type: application/json" \
64
+ -d '{
65
+ "name": "dummy",
66
+ "password": "dummy",
67
+
68
+ }'
69
+
70
+ - name : Set up npm authentication
71
+ run : |
72
+ echo "//localhost:4873/:_auth=$(echo -n 'dummy:dummy' | base64)" >> ~/.npmrc
73
+ echo "[email protected] " >> ~/.npmrc
74
+ echo "always-auth=true" >> ~/.npmrc
65
75
66
76
for i in {1..30}; do
67
77
if curl -sf http://localhost:4873/-/ping > /dev/null; then break; fi
68
78
echo "Waiting for Verdaccio to be ready..."; sleep 2;
69
79
done
70
80
npm config set registry http://localhost:4873
71
- node -e "require('fs').appendFileSync(require('path').join(require('os').homedir(), '.npmrc'), '//localhost:4873/:_auth=' + Buffer.from('dummy:dummy').toString('base64') + '\[email protected] \nalways-auth=true\n')"
81
+
82
+ - name : Setup staging npm package
83
+ if : ${{ github.event.inputs.package_url != '' }}
84
+ run : |
85
+ echo 'Publishing tar.gz to local registry'
86
+ curl -o staging_package.tgz "$PACKAGE_URL"
72
87
npm publish staging_package.tgz --registry http://localhost:4873/
73
88
shell : bash
74
89
You can’t perform that action at this time.
0 commit comments