Skip to content

Update dotnet-desktop.yml #64

Update dotnet-desktop.yml

Update dotnet-desktop.yml #64

# This workflow will build and test a Windows Forms desktop application
# built on .NET Core.
name: .NET Core Desktop
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
name: Build project
runs-on: windows-latest
env:
Solution_Name: NDifference.sln
Test_Project_Path: tests\UnitTests\UnitTests.csproj
Configuration: 'Release'
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# Install the .NET Core workload
- name: Install .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
# Execute all unit tests in the solution
- name: Execute unit tests
run: dotnet test
# Build the application
- name: Build the application
run: dotnet build --configuration ${{ env.Configuration }}
# Zip the application
- name: Zip project
uses: thedoctor0/zip-release@master
with:
type: "zip"
directory: "./bin/{{ env.Configuration }}/net8.0-windows"
filename: "NDifference.zip"
- name: Upload Release
uses: ncipollo/[email protected]
with:
artifacts: "NDifference.zip"
token: ${{ secrets.GITHUB_TOKEN }}
#- name: 🚀 Upload Build Artifacts
# id: upload-artifact
# uses: actions/upload-artifact@v4
# with:
# name: NDifferenceUI
# path: ./bin/{{ env.Configuration}}/NDifference.zip
# if-no-files-found: error