Skip to content

Commit ca1bec7

Browse files
authored
Merge pull request #62 from 07souravkunda/add_staging_package_publish
add: staging npm package publish
2 parents 225db66 + 1cb0dcc commit ca1bec7

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/workflows/reviewing_changes.yml

+17
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
commit_sha:
1010
description: 'The full commit id to build'
1111
required: true
12+
package_url:
13+
description: 'Staging package url'
14+
required: false
1215

1316
jobs:
1417
comment-run:
@@ -23,6 +26,7 @@ jobs:
2326
env:
2427
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
2528
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
29+
PACKAGE_URL: ${{ github.event.inputs.package_url }}
2630

2731
steps:
2832
- uses: actions/checkout@v3
@@ -47,11 +51,24 @@ jobs:
4751
if (result.status !== 201) {
4852
console.log('Failed to create check run')
4953
}
54+
5055
- name: Setup node
5156
uses: actions/setup-node@v3
5257
with:
5358
node-version: ${{ matrix.node }}
5459

60+
- name: Setup staging npm package
61+
if: ${{ github.event.inputs.package_url != '' }}
62+
run: |
63+
echo 'Publishing tar.gz to local registry'
64+
curl -o staging_package.tgz "$PACKAGE_URL"
65+
npm install verdaccio -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
69+
npm publish staging_package.tgz --registry http://localhost:4873/
70+
shell: bash
71+
5572
- name: Install dependencies
5673
run: npm install
5774

0 commit comments

Comments
 (0)