MSBuild #74
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: | |
workflow_dispatch: | |
pull_request: | |
env: | |
# Path to the solution file relative to the root of the project. | |
SOLUTION_FILE_PATH: vc143/Shareaza.sln | |
RELEASEBUILD_FILE_PATH: vc143/ReleaseBuild.props | |
permissions: | |
contents: read | |
jobs: | |
workflow_matrix: | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
platform: [ Win32, x64 ] | |
type: [ Release, Debug ] | |
steps: | |
- name: Checkout GIT sources | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Install GitVersion | |
uses: gittools/actions/gitversion/[email protected] | |
with: | |
versionSpec: '5.x' | |
- name: Install GitVersion | |
uses: gittools/actions/gitversion/[email protected] | |
with: | |
versionSpec: '5.x' | |
- name: Add MSBuild to PATH | |
uses: microsoft/[email protected] | |
- name: Restore NuGet packages (zlibwapi) | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: nuget restore zlibwapi/zlibwapi_143.vcxproj -PackagesDirectory zlibwapi/packages | |
- name: Restore NuGet packages (Shareaza) | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: nuget restore ${{env.SOLUTION_FILE_PATH}} | |
- name: Determine Version | |
id: gitversion | |
uses: gittools/actions/gitversion/[email protected] | |
- name: Build | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
# Add additional options to the MSBuild command line here (like platform or verbosity level). | |
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference | |
run: msbuild ${{env.SOLUTION_FILE_PATH}} /nologo /v:m /t:Rebuild /p:ForceImportBeforeCppTargets=${{env.RELEASEBUILD_FILE_PATH}} /p:Configuration=${{ matrix.type }} /p:Platform=${{ matrix.platform }} /p:DefineConstants=BUILDFROMMSBUILD /p:RevisionSHA=${{ steps.gitversion.outputs.ShortSha }} /p:RevisionDate=${{ steps.gitversion.outputs.commitDate }} /fl /flp:Summary | |
- name: Archive Shareaza Release | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Shareaza Windows ${{ matrix.platform }} ${{ matrix.type }} | |
path: setup/builds/*.exe |