-
Notifications
You must be signed in to change notification settings - Fork 9
72 lines (63 loc) · 2.43 KB
/
01-build-showcases.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
---
name: Build Showcases
on:
workflow_call:
jobs:
build-showcases:
name: Build Showcases
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
showcases:
[angular, playground, react, reactwind, vue]
steps:
- name: ⬇ Checkout repo
uses: actions/checkout@v4
- name: 🔄 Init Cache
uses: ./.github/actions/npm-cache
- name: ↔ Get download params for showcase
run: |
if echo ${{ matrix.showcases }} | grep -c "angular"
then
echo "framework=angular" >> $GITHUB_OUTPUT
elif echo ${{ matrix.showcases }} | grep -c "playground"
then
echo "framework=react" >> $GITHUB_OUTPUT
elif echo ${{ matrix.showcases }} | grep -c "react"
then
echo "framework=react" >> $GITHUB_OUTPUT
elif echo ${{ matrix.showcases }} | grep -c "reactwind"
then
echo "framework=react" >> $GITHUB_OUTPUT
else
echo "framework=vue" >> $GITHUB_OUTPUT
fi
echo "theme=default" >> $GITHUB_OUTPUT
id: download-params
- name: ⬇ Download Stencil ${{ steps.download-params.outputs.theme }}
uses: actions/download-artifact@v4
with:
name: stencil-${{ steps.download-params.outputs.theme }}-${{ steps.download-params.outputs.framework }}
path: packages/db-ui-elements-stencil
- name: ⬇ Download Output Target ${{ steps.download-params.outputs.framework }}
uses: actions/download-artifact@v4
with:
name: output-target-${{ steps.download-params.outputs.theme }}-${{ steps.download-params.outputs.framework }}
path: packages/db-ui-elements-${{ steps.download-params.outputs.framework }}
- name: 🔨 Build Showcase ${{ matrix.showcases }}
run: |
cd showcase/${{ matrix.showcases }}-showcase
npm i
npm run build
cp dist/${{ matrix.showcases }}-showcase/index.html dist/${{ matrix.showcases }}-showcase/404.html
- name: ⬆ Upload Showcase ${{ matrix.showcases }} dist folder
uses: actions/upload-artifact@v4
with:
name: showcase-${{ matrix.showcases }}
path: showcase/${{ matrix.showcases }}-showcase/dist
- name: 💀 Killing me softly
uses: ./.github/actions/cancel-workflow
if: failure()
with:
token: ${{ secrets.GITHUB_TOKEN }}