Files
DevOpsExamples/.gitea/workflows/main_build-aspnetcore_release.yml
T
Lance McCarthy 82e0ef17e9
ASP.NET AJAX / build_web_app (push) Waiting to run
Angular / build_angular (push) Waiting to run
ASP.NET Core (with Reporting) / build_windows (push) Waiting to run
Blazor (with Reporting) / build_windows (push) Waiting to run
Blazor (with Reporting) / build_linux (push) Waiting to run
Console (.NET) / build_console (arm64, linux) (push) Waiting to run
Console (.NET) / build_console (arm64, win) (push) Waiting to run
Console (.NET) / build_console (x64, linux) (push) Waiting to run
Console (.NET) / build_console (x64, win) (push) Waiting to run
MAUI / Windows Smoketest (push) Waiting to run
MAUI / Android Smoketest (push) Waiting to run
MAUI / iOS Smoketest (push) Waiting to run
MAUI / MacCatalyst Smoketest (push) Waiting to run
WinForms (.NET Framework) / build_desktop (Release, x64) (push) Waiting to run
WinForms (.NET Framework) / build_desktop (Release, x86) (push) Waiting to run
WinUI3 / build-windows (push) Waiting to run
WPF (.NET Framework) / build_desktop (Release, x64) (push) Waiting to run
WPF (.NET Framework) / build_desktop (Release, x86) (push) Waiting to run
ASP.NET Core (with Reporting) - Docker / Microsoft Base - Publish to Docker Hub (push) Waiting to run
ASP.NET Core (with Reporting) - Docker / CentOS Base - Publish to Docker Hub (push) Waiting to run
Blazor (with Reporting) - Docker / Dockerfile Build and Publish (push) Waiting to run
First push
2026-05-21 15:10:03 -04:00

66 lines
2.2 KiB
YAML

name: ASP.NET Core (with Reporting) - Azure
on:
workflow_dispatch:
env:
DOTNET_VERSION: "10.0.x"
PROJECT_PATH: src/AspNetCore/MyAspNetCoreApp/MyAspNetCoreApp.csproj
NUGETCONFIG_PATH: src/NuGet.Config
AZURE_WEBAPP_NAME: DevOpsExamplesCore
ARTIFACTS_DIRECTORY: "src/AspNetCore/MyAspNetCoreApp/artifacts"
TELERIK_USERNAME: "api-key"
TELERIK_PASSWORD: ${{secrets.TELERIK_NUGET_KEY}}
TELERIK_LICENSE: ${{secrets.TELERIK_LICENSE_KEY}}
jobs:
build_windows:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v6
# ----------------------------------------------------------------------- #
# BUILD
# ----------------------------------------------------------------------- #
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{env.DOTNET_VERSION}}
- name: Restore NuGet Packages
run: dotnet restore ${{env.PROJECT_PATH}} --configfile ${{env.NUGETCONFIG_PATH}}
- name: Build ASP.NET Core Project
run: dotnet publish ${{env.PROJECT_PATH}} -o ${{env.ARTIFACTS_DIRECTORY}} --no-restore
# ----------------------------------------------------------------------- #
# DEPLOY to https://devopsexamplescore.azurewebsites.net/
# ----------------------------------------------------------------------- #
# Option 1
# Deploy using the publish profile saved as a Github Actions secret
- name: Deploy to Azure WebApp
uses: azure/webapps-deploy@v3
with:
app-name: ${{env.AZURE_WEBAPP_NAME}}
publish-profile: ${{secrets.DEVOPSEXAMPLESCORE_PUBLISHSETTINGS}}
package: ${{env.ARTIFACTS_DIRECTORY}}
# Option 2
# Use a service principal to log into Azure, no reliance on GitHub secrets
# - name: Azure Login
# uses: azure/login@v2
# with:
# client-id: ${{secrets.AZUREAPPSERVICE_CLIENTID}}
# tenant-id: ${{secrets.AZUREAPPSERVICE_TENANTID}}
# subscription-id: ${{secrets.AZUREAPPSERVICE_SUBSCRIPTIONID}}
# - name: Deploy to Azure WebApp
# uses: azure/webapps-deploy@v3
# with:
# app-name: ${{env.AZURE_WEBAPP_NAME}}
# package: ${{env.ARTIFACTS_DIRECTORY}}