Skip to content

build(deps): bump Microsoft.NET.Test.Sdk from 17.10.0 to 17.11.1 #171

build(deps): bump Microsoft.NET.Test.Sdk from 17.10.0 to 17.11.1

build(deps): bump Microsoft.NET.Test.Sdk from 17.10.0 to 17.11.1 #171

Workflow file for this run

name: CI
on:
create:
branches:
- release/**
push:
branches:
- master
- dev/**
paths:
- MemoryModule/**
- MemoryModule.Compact.Windows/**
- MemoryModule.Tests/**
- MemoryModule.Compact.Windows.Tests/**
- .github/workflows/ci.yml
- "*.yml"
- "*.md"
pull_request:
branches:
- master
paths:
- MemoryModule/**
- MemoryModule.Compact.Windows/**
- MemoryModule.Tests/**
- MemoryModule.Compact.Windows.Tests/**
- .github/workflows/ci.yml
- "*.yml"
- "*.md"
jobs:
build:
env:
BUILD_CONFIG: 'Release'
SOLUTION: 'MemoryModule.Windows.sln'
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: '5.x'
- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/[email protected]
- name: Setup NuGet
uses: NuGet/[email protected]
- name: Restore dependencies
run: nuget restore $env:SOLUTION
- name: Setup .NET
run: |
Invoke-WebRequest 'https://dot.net/v1/dotnet-install.ps1' -OutFile 'dotnet-install.ps1'
./dotnet-install.ps1 -Channel Current
shell: pwsh
- name: Setup MSBuild
uses: microsoft/[email protected]
- name: Build
run: msbuild $env:SOLUTION /p:Configuration=$env:BUILD_CONFIG /p:Platform="Any CPU" -p:Version=${{ steps.gitversion.outputs.assemblySemVer }}
- name: Run tests
run: dotnet test $env:SOLUTION /p:Configuration=$env:BUILD_CONFIG /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --no-restore --no-build -l "console;verbosity=detailed"
- name: Build nuget packages
run: msbuild -t:pack $env:SOLUTION -p:Configuration=$env:BUILD_CONFIG -p:PackageVersion=${{ steps.gitversion.outputs.semVer }}
- name: Move nuget packages
run: mkdir .nupkgs; get-childitem *.*nupkg -recurse | foreach-object {move-item $_ -destination .nupkgs}
shell: pwsh
- name: Publish nuget artifacts
uses: actions/upload-artifact@v4
with:
name: packages.${{ steps.gitversion.outputs.semVer }}
path: .nupkgs/**
- name: Publish dev
if: github.ref == 'refs/heads/master'
run: nuget push .nupkgs\** -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}}
- name: Publish
if: startsWith(github.ref, 'refs/heads/release')
run: nuget push .nupkgs\** -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}}