Skip to content

Commit 69c6ae6

Browse files
Merge pull request #45 from 07souravkunda/add_staging_pakage_publish
add: staging npm package publish
2 parents 3673a15 + 7ef35b5 commit 69c6ae6

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ JestJS integration with BrowserStack for E2E functional testing of UI using Sele
66

77
---
88
- Clone the repository
9-
- Install dependencies using, npm install or yarn install
9+
- Install dependencies using, npm install or yarn install
1010
- Set your [BrowserStack Username and Access Key](https://www.browserstack.com/accounts/settings) in [browserstack.yml](browserstack.yml) `npx setup --username userName --key accessKey`
11-
- To run sample test, run `npm run sample-test` or `yarn run sample-test`
11+
- To run sample test, run `npm run sample-test` or `yarn run sample-test`
1212
- To run tests on private websites,
1313
- set browserstackLocal: true at [browserstack.yml](browserstack.yml)
1414
- run `npm run sample-local-test` or `yarn run sample-local-test`

0 commit comments

Comments
 (0)