33 lines
No EOL
849 B
YAML
33 lines
No EOL
849 B
YAML
name: Dotnet Build
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: win11
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
|
|
- name: MSBuild version
|
|
run: |
|
|
msbuild -version
|
|
|
|
- name: Extract project version
|
|
run: |
|
|
$version = Select-String -Path "WeeXnes/WeeXnes.csproj" -Pattern "<Version>(.+?)</Version>" | ForEach-Object {
|
|
($_ -match "<Version>(.+?)</Version>") | Out-Null
|
|
$matches[1]
|
|
}
|
|
Write-Output "##vso[task.setvariable variable=PROJECT_VERSION]$version"
|
|
Write-Output "Project version is $version"
|
|
|
|
|
|
- name: Restore Packages
|
|
run: nuget restore WeeXnes.sln
|
|
|
|
- name: Build Solution
|
|
run: |
|
|
msbuild WeeXnes.sln /p:DeleteExistingFiles=True /p:platform="Any CPU" /p:configuration="Release" |