Skip to content

Commit f7671eb

Browse files
authored
Merge pull request #17 from 07souravkunda/add_staging_package
add: staging npm package
2 parents 826013c + 948f536 commit f7671eb

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

.github/workflows/sanity-workflow.yml

Lines changed: 17 additions & 1 deletion
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:
@@ -17,12 +20,13 @@ jobs:
1720
fail-fast: false
1821
max-parallel: 3
1922
matrix:
20-
node: ['14', '16', '18']
23+
node: ['14', '16', '18', '20']
2124
os: [ macos-latest, windows-latest, ubuntu-latest ]
2225
name: NodeJS Playwright Repo ${{ matrix.node }} - ${{ matrix.os }} Sample
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 dummy@gmail.com -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

0 commit comments

Comments
 (0)