-
Notifications
You must be signed in to change notification settings - Fork 9
61 lines (52 loc) · 1.93 KB
/
01-build-stencil-targets.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
---
name: Build Stencil Targets
on:
workflow_call:
jobs:
build-stencil-targets:
name: Build Stencil Targets
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
targets: [ngx-elements, react-elements, v-elements]
themes: [default, enterprise]
steps:
- name: ⬇ Checkout repo
uses: actions/checkout@v4
- name: 🔄 Init Cache
uses: ./.github/actions/npm-cache
- name: 🔨 Build Stencil ${{ matrix.themes }}
run: npm run build.${{ matrix.themes }} --workspace=@db-ui/elements
- name: 🔨 Build Output Targets ${{ matrix.themes }}
run: |
npm run build --workspace=@db-ui/${{ matrix.targets }}
cat ./packages/db-ui-elements-stencil/package.json
- name: ↔ Get path for target
run: |
if echo ${{ matrix.targets }} | grep -c "ngx-elements"
then
cat ./packages/db-ui-elements-angular/dist/lib/package.json
echo "framework=angular" >> $GITHUB_OUTPUT
elif echo ${{ matrix.targets }} | grep -c "react-elements"
then
echo "framework=react" >> $GITHUB_OUTPUT
else
echo "framework=vue" >> $GITHUB_OUTPUT
fi
id: path
- name: ⬆ Upload Stencil ${{ matrix.themes }}
uses: actions/upload-artifact@v4
with:
name: stencil-${{ matrix.themes }}-${{ steps.path.outputs.framework }}
path: packages/db-ui-elements-stencil
- name: ⬆ Upload Output Target ${{ steps.path.outputs.framework }}
uses: actions/upload-artifact@v4
with:
name: output-target-${{ matrix.themes }}-${{ steps.path.outputs.framework }}
path: packages/db-ui-elements-${{ steps.path.outputs.framework }}
- name: 💀 Killing me softly
uses: ./.github/actions/cancel-workflow
if: failure()
with:
token: ${{ secrets.GITHUB_TOKEN }}