Skip to content

Update workflow

Update workflow #3

Workflow file for this run

name: build
on:
workflow_dispatch:
push:
branches: [ "master" ]
pull_request:
jobs:
build:
runs-on: windows-latest
env:
Solution_Path: ContextMenuManager.sln
Project_Path: ContextMenuManager\ContextMenuManager.csproj
steps:
# Checkout codes
- name: Checkout
uses: actions/checkout@v5
# Restore NuGet packages (for .NET Framework projects)
- name: Restore dependencies
run: nuget restore ${{ env.Solution_Path }}
# Build the solution with MSBuild
- name: Build
run: msbuild ${{ env.Solution_Path }} /p:Configuration=Release
# (Optional) Run tests if you have MSTest/NUnit/xUnit for .NET Framework
# - name: Execute unit tests
# run: vstest.console.exe "**\bin\Release\*test*.dll"
# Upload build artifact
- name: Upload Build package
uses: actions/upload-artifact@v4
with:
path: |
ContextMenuManager\bin\Release\ContextMenuManager.exe
compression-level: 0