Skip to content

Commit 2e343af

Browse files
committed
ci(publish): add github action to publish package to npmjs
1 parent 26b00cb commit 2e343af

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/publish.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Generate new release
2+
on:
3+
workflow_dispatch:
4+
push:
5+
tags:
6+
- 'v[0-9]+.[0-9]+.[0-9]+'
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Check Out Repository
13+
- uses: actions/checkout@v4
14+
15+
- name: Setup Node
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: '23.x'
19+
registry-url: 'https://registry.npmjs.org'
20+
21+
- name: Install dependencies 📦
22+
- run: npm ci
23+
24+
- name: Publish to npmjs
25+
- run: npm publish --access public
26+
env:
27+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)