Skip to content

provide version as build parameter #20

provide version as build parameter

provide version as build parameter #20

Workflow file for this run

name: Build Visual Studio Project
on: [push]
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
platform: [x86, x64]
configuration: [Debug, Release]
steps:
- name: Checkout code
uses: actions/[email protected]
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
- uses: dotnet/nbgv@master
id: nbgv
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2
- name: Build with MSBuild
run: |
msbuild jN.vcxproj /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }} /p:PreprocessorDefinitions="VERSION_MA=${{steps.nbgv.outputs.VersionMajor}};VERSION_MI=${{steps.nbgv.outputs.VersionMinor}};REVISION=${{steps.nbgv.outputs.BuildNumber}};VERSION_REVISION=${{steps.nbgv.outputs.VersionRevision}}"
- name: Create zip file
run: |
if ("${{ matrix.platform }}" -eq "x64"){
Copy-Item ${{ matrix.platform}}/${{ matrix.configuration }}/*.dll ./deploy/
} else {
Copy-Item ${{ matrix.configuration }}/*.dll ./deploy/
}
cd ./deploy
7z a ../jN_${{ steps.nbgv.outputs.SemVer2 }}_${{ matrix.platform }}.zip *
- name: Upload artifacts
uses: actions/[email protected]
with:
name: Build artifacts ${{ matrix.platform }} ${{ matrix.configuration }}
path: |
jN_*.zip
${{ matrix.configuration }}/*.dll
${{ matrix.configuration }}/*.pdb
${{ matrix.platform }}/${{ matrix.configuration }}/*.dll
${{ matrix.platform }}/${{ matrix.configuration }}/*.pdb
retention-days: 3