stages:
- build_and_publish
build_and_publish:
stage: build_and_publish
script:
- 'nuget locals all -clear'
- 'nuget restore $env:SOLUTION_NAME -SolutionDirectory .'
- 'dotnet add "$env:PROJECT_PATH" package Microsoft.Toolkit.Uwp.Notifications --version 7.1.3'
- '& "C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe" $env:SOLUTION_NAME /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath="$env:CI_PROJECT_DIR\bin\Release\"'
- 'mkdir Publish'
- 'xcopy /I /E /Y "$env:CI_PROJECT_DIR\bin\Release\*" Publish/'
- 'Compress-Archive -Path Publish\* -DestinationPath Publish\Product.zip -Force'
artifacts:
name: "Product-${CI_COMMIT_REF_NAME}"
paths:
- Publish/Product.zip
expire_in: never
tags:
- windows
variables:
SOLUTION_NAME: './Source/Product.sln'
PROJECT_PATH: './Source/Product.GUI/Product.GUI.csproj'
cache:
paths:
- .nuget/
stages:
- build_and_publish
build_and_publish:
stage: build_and_publish
script:
- 'nuget locals all -clear'
- 'nuget restore $env:SOLUTION_NAME -SolutionDirectory .'
- 'dotnet add "$env:PROJECT_PATH" package Microsoft.Toolkit.Uwp.Notifications --version 7.1.3'
- '& "C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe" $env:SOLUTION_NAME /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath="$env:CI_PROJECT_DIR\bin\Release\"'
- 'mkdir Publish'
- 'xcopy /I /E /Y "$env:CI_PROJECT_DIR\bin\Release\*" Publish/'
- 'Compress-Archive -Path Publish\* -DestinationPath Publish\Product.zip -Force'
artifacts:
name: "Product-${CI_COMMIT_REF_NAME}"
paths:
- Publish/Product.zip
expire_in: never
tags:
- windows
variables:
SOLUTION_NAME: './Source/Product.sln'
PROJECT_PATH: './Source/Product.GUI/Product.GUI.csproj'
cache:
paths:
- .nuget/