Skip to content

Commit 1f4bb96

Browse files
author
Amram Englander
committed
Add npm publish workflow via GitHub Actions
1 parent 9df15e4 commit 1f4bb96

2 files changed

Lines changed: 29 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Publish to npm
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
12+
- uses: actions/setup-node@v4
13+
with:
14+
node-version: 22
15+
registry-url: https://registry.npmjs.org
16+
17+
- run: npm ci --ignore-scripts
18+
19+
- name: Install Playwright Chromium
20+
run: npx playwright install chromium
21+
22+
- run: npm run build
23+
24+
- run: npm publish --access public
25+
env:
26+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@
3838
"engines": {
3939
"node": ">=22"
4040
},
41+
"publishConfig": {
42+
"registry": "https://registry.npmjs.org"
43+
},
4144
"dependencies": {
4245
"chalk": "^5.4.1",
4346
"cli-table3": "^0.6.5",

0 commit comments

Comments
 (0)