-
Notifications
You must be signed in to change notification settings - Fork 9
83 lines (71 loc) · 2.6 KB
/
01-build-storybook.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
---
name: Build Storybook
on:
workflow_call:
inputs:
tag:
required: true
type: string
default: '0.0.0'
jobs:
build-storybook:
name: Build Storybook
runs-on: ubuntu-latest
steps:
- name: ⬇ Checkout repo
uses: actions/checkout@v4
- name: 🔄 Init Cache
uses: ./.github/actions/npm-cache
- name: ⬇ Download Stencil default
uses: actions/download-artifact@v4
with:
# It doesn't matter which framework we download for stencil
name: stencil-default-angular
path: packages/db-ui-elements-stencil
- name: ⬇ Download Showcase Angular dist folder
uses: actions/download-artifact@v4
with:
name: showcase-angular
path: showcase/angular-showcase/dist
- name: ⬇ Download Showcase playground dist folder
uses: actions/download-artifact@v4
with:
name: showcase-playground
path: showcase/playground-showcase/dist
- name: ⬇ Download Showcase react dist folder
uses: actions/download-artifact@v4
with:
name: showcase-react
path: showcase/react-showcase/dist
- name: ⬇ Download Showcase reactwind dist folder
uses: actions/download-artifact@v4
with:
name: showcase-reactwind
path: showcase/reactwind-showcase/dist
- name: ⬇ Download Showcase vue dist folder
uses: actions/download-artifact@v4
with:
name: showcase-vue
path: showcase/vue-showcase/dist
- name: 🔨 Build Storybook
env:
VERSION: ${{ inputs.tag }}
run: |
mv showcase/angular-showcase/dist/angular-showcase packages/db-ui-elements-stencil/www/angular-showcase
mv showcase/playground-showcase/dist/playground-showcase packages/db-ui-elements-stencil/www/playground-showcase
mv showcase/react-showcase/dist/react-showcase packages/db-ui-elements-stencil/www/react-showcase
mv showcase/reactwind-showcase/dist/reactwind-showcase packages/db-ui-elements-stencil/www/reactwind-showcase
mv showcase/vue-showcase/dist/vue-showcase packages/db-ui-elements-stencil/www/vue-showcase
touch .env
echo VERSION=${{ inputs.tag }} >> .env
npm run build:storybook
- name: ⬆ Upload build
uses: actions/upload-artifact@v4
with:
name: build
path: out
- name: 💀 Killing me softly
uses: ./.github/actions/cancel-workflow
if: failure()
with:
token: ${{ secrets.GITHUB_TOKEN }}