Skip to content

Commit 30bb8e7

Browse files
committed
added svelte and vue to npm workflow
1 parent 1b4dbd9 commit 30bb8e7

File tree

1 file changed

+58
-7
lines changed

1 file changed

+58
-7
lines changed

.github/workflows/npmPublish.yml

Lines changed: 58 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish npm Package
1+
name: Publish npm Packages
22

33
on:
44
push:
@@ -8,24 +8,75 @@ on:
88
jobs:
99
publish-react:
1010
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v4
14+
15+
- name: Set up Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: '20' # Use Node.js version 20
19+
20+
- name: Install dependencies for package-react
21+
working-directory: ./package-react
22+
run: npm install
1123

24+
- name: Build package-react
25+
working-directory: ./package-react
26+
run: npm run build # If you have a build step, otherwise remove this step
27+
28+
- name: Publish package-react
29+
working-directory: ./package-react
30+
env:
31+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
32+
run: npm publish
33+
34+
publish-svelte:
35+
runs-on: ubuntu-latest
36+
steps:
37+
- name: Checkout repository
38+
uses: actions/checkout@v4
39+
40+
- name: Set up Node.js
41+
uses: actions/setup-node@v4
42+
with:
43+
node-version: '20' # Use Node.js version 20
44+
45+
- name: Install dependencies for package-svelte
46+
working-directory: ./package-svelte
47+
run: npm install
48+
49+
- name: Build package-svelte
50+
working-directory: ./package-svelte
51+
run: npm run build # If you have a build step, otherwise remove this step
52+
53+
- name: Publish package-svelte
54+
working-directory: ./package-svelte
55+
env:
56+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
57+
run: npm publish
58+
59+
publish-vue:
60+
runs-on: ubuntu-latest
1261
steps:
1362
- name: Checkout repository
1463
uses: actions/checkout@v4
1564

1665
- name: Set up Node.js
1766
uses: actions/setup-node@v4
1867
with:
19-
node-version: '20'
68+
node-version: '20' # Use Node.js version 20
2069

21-
- name: Install dependencies
22-
run: cd package-react
23-
npm install
70+
- name: Install dependencies for package-vue
71+
working-directory: ./package-vue
72+
run: npm install
2473

25-
- name: Build package
74+
- name: Build package-vue
75+
working-directory: ./package-vue
2676
run: npm run build # If you have a build step, otherwise remove this step
2777

28-
- name: Publish package
78+
- name: Publish package-vue
79+
working-directory: ./package-vue
2980
env:
3081
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3182
run: npm publish

0 commit comments

Comments
 (0)