Skip to content

Commit

Permalink
Create ci-build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Andronovo-bit committed Feb 22, 2024
1 parent b0ac12b commit be3cb10
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: .NET MAUI CI for Windows

on:
push:
branches: [ master ]
paths-ignore:
- '**/*.md'
- '**/*.gitignore'
- '**/*.gitattributes'
pull_request:
branches: [ master ]
workflow_dispatch:

permissions:
contents: read

env:
DOTNET_NOLOGO: true # Disable the .NET logo
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true # Disable the .NET first time experience
DOTNET_CLI_TELEMETRY_OPTOUT: true # Disable sending .NET CLI telemetry

jobs:
# MAUI Windows Build
build-windows:
runs-on: windows-latest
name: Windows Build
steps:

- name: Checkout
uses: actions/checkout@v4

- name: Setup .NET 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x.x

- name: Install MAUI Workload
run: dotnet workload install maui --ignore-failed-sources

- name: Restore Dependencies
run: dotnet restore HuaweiHMSInstaller.sln

- name: Build
run: dotnet build HuaweiHMSInstaller.sln --configuration Release --framework net8.0-windows10.0.19041.0 --no-restore

- name: Publish for Windows
run: dotnet publish src/HuaweiHMSInstaller.csproj --framework net8.0-windows10.0.19041.0 --no-self-contained -c Release -o ./publish/windows

- name: Upload Windows Artifact
uses: actions/upload-artifact@v4
with:
name: windows-app
path: ./publish/windows/**

0 comments on commit be3cb10

Please sign in to comment.