|
1 |
| -name: Publish npm Package |
| 1 | +name: Publish npm Packages |
2 | 2 |
|
3 | 3 | on:
|
4 | 4 | push:
|
|
8 | 8 | jobs:
|
9 | 9 | publish-react:
|
10 | 10 | 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 |
11 | 23 |
|
| 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 |
12 | 61 | steps:
|
13 | 62 | - name: Checkout repository
|
14 | 63 | uses: actions/checkout@v4
|
15 | 64 |
|
16 | 65 | - name: Set up Node.js
|
17 | 66 | uses: actions/setup-node@v4
|
18 | 67 | with:
|
19 |
| - node-version: '20' |
| 68 | + node-version: '20' # Use Node.js version 20 |
20 | 69 |
|
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 |
24 | 73 |
|
25 |
| - - name: Build package |
| 74 | + - name: Build package-vue |
| 75 | + working-directory: ./package-vue |
26 | 76 | run: npm run build # If you have a build step, otherwise remove this step
|
27 | 77 |
|
28 |
| - - name: Publish package |
| 78 | + - name: Publish package-vue |
| 79 | + working-directory: ./package-vue |
29 | 80 | env:
|
30 | 81 | NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
31 | 82 | run: npm publish
|
0 commit comments