|
1 | 1 | name: ui-kit-ts - default
|
2 | 2 |
|
3 | 3 | on:
|
4 |
| - push: |
5 |
| - branches: |
6 |
| - - "main" |
7 |
| - release: |
8 |
| - types: [ created ] |
9 |
| - schedule: |
10 |
| - - cron: '0 6 * * 1' # At 06:00 on Monday |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - "main" |
| 7 | + release: |
| 8 | + types: [created] |
| 9 | + schedule: |
| 10 | + - cron: "0 6 * * 1" # At 06:00 on Monday |
11 | 11 |
|
12 | 12 | jobs:
|
13 |
| - build: |
14 |
| - runs-on: ubuntu-latest |
15 |
| - steps: |
16 |
| - - uses: actions/checkout@v3 |
17 |
| - - uses: actions/setup-node@v3 |
18 |
| - with: |
19 |
| - node-version: '19.1.0' |
20 |
| - - name: npm install library |
21 |
| - working-directory: ./library |
22 |
| - run: npm install |
| 13 | + build: |
| 14 | + runs-on: ubuntu-latest |
| 15 | + steps: |
| 16 | + - uses: actions/checkout@v3 |
| 17 | + - uses: actions/setup-node@v3 |
| 18 | + with: |
| 19 | + node-version: "19.1.0" |
| 20 | + - name: npm install |
| 21 | + run: npm install |
23 | 22 |
|
24 |
| - - name: npm build library |
25 |
| - working-directory: ./library |
26 |
| - run: npm run build |
| 23 | + - name: npm build library |
| 24 | + run: npm run build:lib |
27 | 25 |
|
28 |
| - - name: npm install showcase |
29 |
| - working-directory: ./showcase |
30 |
| - run: npm install |
| 26 | + - name: npm build showcase |
| 27 | + run: npm run build:sc |
31 | 28 |
|
32 |
| - - name: npm build showcase |
33 |
| - working-directory: ./showcase |
34 |
| - run: npm run build |
| 29 | + - name: deploy Showcase to Github Pages |
| 30 | + if: ${{ github.event_name == 'release' }} |
| 31 | + |
| 32 | + with: |
| 33 | + branch: docs |
| 34 | + folder: dist-showcase |
| 35 | + single-commit: true |
35 | 36 |
|
36 |
| - - name: deploy Showcase to Github Pages |
| 37 | + publish: |
| 38 | + needs: build |
37 | 39 | if: ${{ github.event_name == 'release' }}
|
38 |
| - |
39 |
| - with: |
40 |
| - branch: docs |
41 |
| - folder: showcase/build |
42 |
| - single-commit: true |
| 40 | + runs-on: ubuntu-latest |
| 41 | + steps: |
| 42 | + - uses: actions/checkout@v3 |
| 43 | + - uses: actions/setup-node@v3 |
| 44 | + with: |
| 45 | + node-version: "19.1.0" |
| 46 | + registry-url: "https://registry.npmjs.org" |
43 | 47 |
|
44 |
| - publish: |
45 |
| - needs: build |
46 |
| - if: ${{ github.event_name == 'release' }} |
47 |
| - runs-on: ubuntu-latest |
48 |
| - defaults: |
49 |
| - run: |
50 |
| - working-directory: 'library' |
51 |
| - steps: |
52 |
| - - uses: actions/checkout@v3 |
53 |
| - - uses: actions/setup-node@v3 |
54 |
| - with: |
55 |
| - node-version: '19.1.0' |
56 |
| - registry-url: 'https://registry.npmjs.org' |
| 48 | + - name: Get release version |
| 49 | + id: release |
| 50 | + run: | |
| 51 | + FULL_VERSION=${{ github.event.release.tag_name }} |
| 52 | + SHORT_VERSION=${FULL_VERSION:1} |
| 53 | + echo shortVersion=${SHORT_VERSION} >> $GITHUB_OUTPUT |
57 | 54 |
|
58 |
| - - name: Get release version |
59 |
| - id: release |
60 |
| - run: | |
61 |
| - FULL_VERSION=${{ github.event.release.tag_name }} |
62 |
| - SHORT_VERSION=${FULL_VERSION:1} |
63 |
| - echo shortVersion=${SHORT_VERSION} >> $GITHUB_OUTPUT |
| 55 | + - name: Update release version |
| 56 | + run: npm version ${{ steps.release.outputs.shortVersion }} |
64 | 57 |
|
65 |
| - - name: Update release version |
66 |
| - working-directory: ./library |
67 |
| - run: npm version ${{ steps.release.outputs.shortVersion }} |
| 58 | + - name: Install dependencies |
| 59 | + run: npm install |
68 | 60 |
|
69 |
| - - name: Install dependencies |
70 |
| - working-directory: ./library |
71 |
| - run: npm install |
| 61 | + - name: Build release |
| 62 | + run: npm run build:lib |
72 | 63 |
|
73 |
| - - name: Build release |
74 |
| - working-directory: ./library |
75 |
| - run: npm run build |
76 |
| - |
77 |
| - - name: Publish to npmjs |
78 |
| - working-directory: ./library |
79 |
| - run: npm publish --access public |
80 |
| - env: |
81 |
| - NODE_AUTH_TOKEN: ${{secrets.NPM_PUBLISH_TOKEN}} |
| 64 | + - name: Publish to npmjs |
| 65 | + run: npm publish --access public |
| 66 | + env: |
| 67 | + NODE_AUTH_TOKEN: ${{secrets.NPM_PUBLISH_TOKEN}} |
0 commit comments