-
Notifications
You must be signed in to change notification settings - Fork 2
99 lines (90 loc) · 2.9 KB
/
Copy pathbuild.yml
File metadata and controls
99 lines (90 loc) · 2.9 KB
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: Build
# This workflow is meant to run on changes pushed to the vnext branch only.
# If it runs on PRs, it will create PRs to the destination repos' vnext branches - we don't want that.
on:
push:
branches:
- vnext
- master
workflow_dispatch:
inputs:
isVerbose:
description: 'Get verbose output from steps - where configurable'
required: false
type: boolean
default: false
platform:
description: 'Technology platform to build (all = every platform in the matrix)'
required: false
type: choice
default: all
options:
- all
- angular
- blazor
- react
- wc
locale:
description: 'Locale to build for (all = every locale in the matrix)'
required: false
type: choice
default: all
options:
- all
- en
- ja
jobs:
build:
strategy:
matrix:
platform: [angular, blazor, react, wc]
locale: [en, ja]
runs-on: ubuntu-latest
if: >
(github.event_name != 'workflow_dispatch' ||
github.event.inputs.platform == 'all' ||
github.event.inputs.platform == matrix.platform) &&
(github.event_name != 'workflow_dispatch' ||
github.event.inputs.locale == 'all' ||
github.event.inputs.locale == matrix.locale)
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
clean: true
persist-credentials: true
lfs: true
path: igniteui-angular-examples
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install npm dependencies
run: npm install
working-directory: ./igniteui-angular-examples/browser
- name: Apply very special configuration
shell: bash
run: |
echo "Current directory: $(pwd)"
sed -i 's/build --configuration production/build --configuration production --base-href=\/angular-demos-dv\//g' package.json
working-directory: ./igniteui-angular-examples/browser
- name: Build project
run: |
if [ "${{ github.event.inputs.isVerbose }}" == "true" ]; then
npm run build:${{ matrix.platform }}:${{ matrix.locale }} --verbose
else
npm run build:${{ matrix.platform }}:${{ matrix.locale }}
fi
working-directory: ./igniteui-angular-examples/browser
- name: Copy web.config to dist
run: |
cp web.config dist/browser/
working-directory: ./igniteui-angular-examples/browser
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: ./igniteui-angular-examples/browser/dist/browser
retention-days: 1