Skip to content

Build sample apps automation (#456) #6

Build sample apps automation (#456)

Build sample apps automation (#456) #6

name: Validate samples
on:
push:
branches:
- main
pull_request:
branches:
- main
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
bwa90:
- '9.0/BlazorSample_BlazorWebApp/**'
bwa80:
- '8.0/BlazorSample_BlazorWebApp/**'
bs70:
- '7.0/BlazorSample_BlazorServer/**'
bs60:
- '6.0/BlazorSample_BlazorServer/**'
bs50:
- '5.0/BlazorSample_BlazorServer/**'
bs31:
- '3.1/BlazorSample_BlazorServer/**'
bw90:
- '9.0/BlazorSample_BlazorWebAssembly/**'
bw80:
- '8.0/BlazorSample_BlazorWebAssembly/**'
bw70:
- '7.0/BlazorSample_BlazorWebAssembly/**'
bw60:
- '6.0/BlazorSample_BlazorWebAssembly/**'
bw50:
- '5.0/BlazorSample_BlazorWebAssembly/**'
bw31:
- '3.1/BlazorSample_BlazorWebAssembly/**'
- name: Get latest .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0'
- name: Restore/build 9.0/BlazorSample_BlazorWebApp
if: steps.filter.outputs.bwa90 == 'true'
run: dotnet build 9.0/BlazorSample_BlazorWebApp
- name: Restore/build 8.0/BlazorSample_BlazorWebApp
if: steps.filter.outputs.bwa80 == 'true'
run: dotnet build 8.0/BlazorSample_BlazorWebApp
- name: Restore/build 7.0/BlazorSample_BlazorServer
if: steps.filter.outputs.bs70 == 'true'
run: dotnet build 7.0/BlazorSample_BlazorServer
- name: Restore/build 6.0/BlazorSample_BlazorServer
if: steps.filter.outputs.bs60 == 'true'
run: dotnet build 6.0/BlazorSample_BlazorServer
- name: Restore/build 5.0/BlazorSample_BlazorServer
if: steps.filter.outputs.bs50 == 'true'
run: dotnet build 5.0/BlazorSample_BlazorServer
- name: Restore/build 3.1/BlazorSample_BlazorServer
if: steps.filter.outputs.bs31 == 'true'
run: dotnet build 3.1/BlazorSample_BlazorServer
- name: Restore/build 9.0/BlazorSample_BlazorWebAssembly
if: steps.filter.outputs.bw90 == 'true'
run: dotnet build 9.0/BlazorSample_BlazorWebAssembly
- name: Restore/build 8.0/BlazorSample_BlazorWebAssembly
if: steps.filter.outputs.bw80 == 'true'
run: dotnet build 8.0/BlazorSample_BlazorWebAssembly
- name: Restore/build 7.0/BlazorSample_BlazorWebAssembly
if: steps.filter.outputs.bw70 == 'true'
run: dotnet build 7.0/BlazorSample_BlazorWebAssembly
- name: Restore/build 6.0/BlazorSample_BlazorWebAssembly
if: steps.filter.outputs.bw60 == 'true'
run: dotnet build 6.0/BlazorSample_BlazorWebAssembly
- name: Restore/build 5.0/BlazorSample_BlazorWebAssembly
if: steps.filter.outputs.bw50 == 'true'
run: dotnet build 5.0/BlazorSample_BlazorWebAssembly
- name: Restore/build 3.1/BlazorSample_BlazorWebAssembly
if: steps.filter.outputs.bw31 == 'true'
run: dotnet build 3.1/BlazorSample_BlazorWebAssembly