Skip to content

Commit 14250f5

Browse files
chore: Add ci-publish workflow (#7)
1 parent 56be38e commit 14250f5

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/ci-publish.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Publish to npm
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*.*.*"
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
# Checkout the code
14+
- name: Checkout repository
15+
uses: actions/checkout@v3
16+
17+
# Set up Node.js
18+
- name: Set up Node.js
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: "18"
22+
cache: "yarn"
23+
24+
# Install dependencies
25+
- name: Install dependencies
26+
run: yarn install
27+
28+
# Build the project
29+
- name: Build the project
30+
run: yarn build
31+
32+
# Publish to npm
33+
- name: Publish to npm
34+
run: npm publish
35+
env:
36+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)