Skip to content

ci: enable Git LFS in checkout step and add platform/locale matrix #12

ci: enable Git LFS in checkout step and add platform/locale matrix

ci: enable Git LFS in checkout step and add platform/locale matrix #12

Workflow file for this run

name: Build

Check failure on line 1 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build.yml

Invalid workflow file

(Line: 45, Col: 9): Unrecognized named-value: 'matrix'. Located at position 121 within expression: (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)
# 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