Skip to content

Bump Microsoft.NET.Test.Sdk from 17.8.0 to 17.9.0 #414

Bump Microsoft.NET.Test.Sdk from 17.8.0 to 17.9.0

Bump Microsoft.NET.Test.Sdk from 17.8.0 to 17.9.0 #414

Workflow file for this run

name: CI
on:
push:
tags:
- v*
branches:
- main
paths:
- src/**
- samples/**
- tests/**
- build/**
- .github/workflows/ci.yml
- global.json
pull_request:
branches:
- main
paths:
- src/**
- samples/**
- tests/**
- build/**
- .github/workflows/ci.yml
- global.json
workflow_dispatch:
jobs:
build:
env:
BUILD_CONFIG: 'Release'
SOLUTION: 'MADE.NET.sln'
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Get Build Version
run: |
Import-Module .\build\GetBuildVersion.psm1
Write-Host $Env:GITHUB_REF
$version = GetBuildVersion -VersionString $Env:GITHUB_REF
echo "BUILD_VERSION=$version" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
shell: pwsh
- name: Setup .NET 6.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Setup .NET 7.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.x
- name: Setup .NET 8.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore $SOLUTION
- name: Setup MSBuild
uses: microsoft/[email protected]
- name: Build
run: msbuild $env:SOLUTION /p:Configuration=$env:BUILD_CONFIG /p:Platform="Any CPU" -p:Version=$env:BUILD_VERSION
- name: Run tests
run: dotnet test /p:Configuration=$env:BUILD_CONFIG /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --no-restore --no-build --verbosity normal
- name: Publish
if: startsWith(github.ref, 'refs/tags/v')
run: nuget push **\*.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}}