Skip to content

Commit c4197fc

Browse files
committed
refactor
1 parent 1d1c863 commit c4197fc

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

.github/workflows/reviewing_changes.yml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,33 @@ jobs:
5757
with:
5858
node-version: ${{ matrix.node }}
5959

60-
- name: Setup staging npm package
61-
if: ${{ github.event.inputs.package_url != '' }}
60+
- name: Register user with Verdaccio
6261
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+
"email": "[email protected]"
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
6575
6676
for i in {1..30}; do
6777
if curl -sf http://localhost:4873/-/ping > /dev/null; then break; fi
6878
echo "Waiting for Verdaccio to be ready..."; sleep 2;
6979
done
7080
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"
7287
npm publish staging_package.tgz --registry http://localhost:4873/
7388
shell: bash
7489

0 commit comments

Comments
 (0)