Skip to content

Commit 6d04042

Browse files
authored
Merge pull request #69 from browserstack/fix_GH_workflow
Fix workflow
2 parents ded01d2 + 2ddb1ce commit 6d04042

File tree

1 file changed

+24
-4
lines changed

1 file changed

+24
-4
lines changed

.github/workflows/reviewing_changes.yml

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff 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 protected]" >> ~/.npmrc
65+
echo "always-auth=true" >> ~/.npmrc
66+
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": "[email protected]"
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 [email protected] -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 [email protected] -r http://localhost:4873
6989
npm publish staging_package.tgz --registry http://localhost:4873/
7090
shell: bash
7191

0 commit comments

Comments
 (0)