Skip to content

Commit f11bad7

Browse files
authored
ci: update npm package publication
1 parent 095c669 commit f11bad7

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

.github/workflows/ci.yml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,30 @@ jobs:
3333

3434
- name: ✅ Run tests
3535
run: npm run test
36-
36+
37+
publish:
38+
name: 📦 Publish
39+
runs-on: ubuntu-latest
40+
needs: lint-test
41+
if: github.ref == 'refs/heads/main'
42+
43+
steps:
44+
- name: 👍 Checkout
45+
uses: actions/checkout@v4
46+
47+
- name: 🐢 Setup node.js
48+
uses: actions/setup-node@v4
49+
with:
50+
node-version: 20
51+
cache: 'npm'
52+
53+
- name: 📥 Install Dependencies
54+
run: npm install
55+
56+
- name: 🛠️ Build
57+
run: npm run build
58+
59+
- name: 🚀 Publish to npm
60+
uses: JS-DevTools/npm-publish@v3
61+
with:
62+
token: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)