Skip to content

2024 Q2 DevCraft update (#145) #22

2024 Q2 DevCraft update (#145)

2024 Q2 DevCraft update (#145) #22

name: Build AJAX Application
on:
workflow_dispatch:
push:
branches:
- main
- "ajax/*"
paths:
- 'src/Ajax/**/*'
- '.github/workflows/main_build-ajax.yml'
jobs:
# A job that builds a .NET Framework ASP.NET AJAX (aka WebForms) application using Telerik UI for ASP.NET AJAX
build_web_app:
runs-on: windows-latest # .NET Framework projects need to be built on Windows machines
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Nuget.exe
uses: nuget/setup-nuget@v2
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v1.3.2
# We are using nuget.exe to restore the nuget packages before using msbuild. See https://docs.microsoft.com/en-us/nuget/reference/nuget-exe-cli-reference
- name: NuGet.exe Restore
run: nuget restore src\Ajax\MySite.sln -ConfigFile src\NuGet.Config
env:
TELERIK_USERNAME: ${{ secrets.MyTelerikAccountUsername }}
TELERIK_PASSWORD: ${{ secrets.MyTelerikAccountPassword }}
# The above Environment Variables (on the left) are expected by the nuget.config file
# The values (on the right) are stored as GtiHub Actions Secrets, see https://github.com/LanceMcCarthy/DevOpsExamples#github-actions-using-secrets-to-set-environment-variables for how to set them.
# Use msbuild to compile the .NET Framework project
- name: Build the AJAX application
run: msbuild src\Ajax\MySite.sln /t:Restore /p:Configuration=Release /p:RuntimeIdentifier=any