Skip to content

Commit 2df2db7

Browse files
authored
Merge pull request #49 from 07souravkunda/add_staging_publish
add: staging npm package publish
2 parents 1639dfe + 5441936 commit 2df2db7

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

.github/workflows/reviewing_changes.yml

Lines changed: 16 additions & 0 deletions
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
@@ -52,6 +56,18 @@ jobs:
5256
with:
5357
node-version: ${{ matrix.node }}
5458

59+
- name: Setup staging npm package
60+
if: ${{ github.event.inputs.package_url != '' }}
61+
run: |
62+
echo 'Publishing tar.gz to local registry'
63+
curl -o staging_package.tgz "$PACKAGE_URL"
64+
npm install verdaccio -g
65+
verdaccio &
66+
npm config set registry http://localhost:4873
67+
npm install -g npm-cli-adduser && npm-cli-adduser -u dummy -p dummy -e [email protected] -r http://localhost:4873
68+
npm publish staging_package.tgz --registry http://localhost:4873/
69+
shell: bash
70+
5571
- name: Install dependencies
5672
run: npm install
5773

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
## Run sample build
1010

1111
---
12-
- Clone the repo
12+
- Clone the repo
1313
- Install dependencies `npm install`
1414
- Set your [BrowserStack Username and Access Key](https://www.browserstack.com/accounts/settings) in [browserstack.yml](browserstack.yml) `npx setup --username userName --key accessKey`
1515
- To run sample test, run `npm run sample-test` or `yarn run sample-test`

0 commit comments

Comments
 (0)