ci: enable Git LFS in checkout step and add platform/locale matrix #12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build | ||
|
Check failure on line 1 in .github/workflows/build.yml
|
||
| # 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 | ||