misc: update readme #75
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: MSBuild | |
on: [push] | |
env: | |
# Path to the solution file relative to the root of the project. | |
SOLUTION_FILE_PATH: ./UFCase.sln | |
# Configuration type to build. | |
# You can convert this to a build matrix if you need coverage of multiple configuration types. | |
# https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix | |
BUILD_CONFIGURATION: Release | |
BUILD_PLATFORM: x64 | |
jobs: | |
build: | |
runs-on: windows-2022 | |
# runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Add MSBuild to PATH | |
uses: microsoft/setup-msbuild@v1.1 | |
- name: Restore NuGet packages | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: | | |
nuget restore ./UFCase/packages.config -SolutionDirectory . | |
nuget restore ./UFCase.Host/packages.config -SolutionDirectory . | |
nuget restore ./UFCase.Host.Test/packages.config -SolutionDirectory . | |
- name: Build the project | |
working-directory: ${{ env.GITHUB_WORKSPACE }} | |
run: msbuild ${{ env.SOLUTION_FILE_PATH }} /m /p:Configuration=${{ env.BUILD_CONFIGURATION }} /p:Platform=${{ env.BUILD_PLATFORM }} | |
env: | |
Configuration: ${{ env.BUILD_CONFIGURATION }} | |
Platform: ${{ env.BUILD_PLATFORM }} | |
# Collect the outputs into one folder for packaging | |
- name: Collect output files | |
shell: bash | |
working-directory: ${{ env.BUILD_PLATFORM }}/${{ env.BUILD_CONFIGURATION }} | |
run: | | |
mkdir -p ./Artifact | |
cp ./UFCase/Microsoft.WindowsAppRuntime.Bootstrap.dll ./Artifact | |
cp ./UFCase/UFCase.exe ./Artifact | |
cp ./UFCase/UFCase.pri ./Artifact | |
cp ./UFCase/UFCase.Isolation.winmd ./Artifact | |
cp -r ./UFCase/Assets ./Artifact | |
cp ./UFCase.Host/UFCase.Host.exe ./Artifact | |
# Upload the application package: https://github.com/marketplace/actions/upload-a-build-artifact | |
- name: Upload UFCase package | |
uses: actions/upload-artifact@v3 | |
with: | |
name: UFCase_portable | |
path: | | |
${{ env.BUILD_PLATFORM }}/${{ env.BUILD_CONFIGURATION }}/Artifact | |