Skip to content

Create main.yml (#36) #21

Create main.yml (#36)

Create main.yml (#36) #21

name: Build WinUI 3 Application
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: windows-latest
steps:
# 1. Checkout the code
- name: Checkout Code
uses: actions/checkout@v3
# 2. Setup .NET SDK
- name: Setup .NET SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.x'
# 3. Install NuGet CLI
- name: Install NuGet CLI
uses: NuGet/setup-nuget@v1
# 4. Restore NuGet packages for the specific project
- name: Restore NuGet Packages
run: dotnet restore TubeSync/TubeSync.csproj
# 5. Build the specific WinUI 3 project with the platform specified x64
- name: Build Solution
run: dotnet build TubeSync/TubeSync.csproj --configuration Release -r win-x64
# 6. Package the app into MSIX for the platform
- name: Package MSIX
run: dotnet publish TubeSync/TubeSync.csproj --configuration Release -r win-x64 -o publish
# 7. Upload MSIX to Articraft
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: msix-package
path: publish/**