Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update package versions #168

Merged
merged 2 commits into from
May 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
133 changes: 23 additions & 110 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
name: CI

on:
workflow_dispatch:
push:
branches:
- main
- rel/*
tags:
- v*.*.*
pull_request:
branches:
- main
Expand All @@ -21,19 +20,28 @@ env:
DotNet6Version: '6.x'

jobs:

WindowsBuild:
name: Build and Test (Windows)
runs-on: windows-latest
environment: Production
BuildAndTest:
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
include:
- os: windows-latest
name: Windows
- os: ubuntu-latest
name: Linux
- os: macos-latest
name: MacOS

name: Build and Test (${{ matrix.name }})
runs-on: ${{ matrix.os }}

steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Install .NET Core ${{ env.DotNet3Version }}
- name: Install .NET ${{ env.DotNet3Version }}
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DotNet3Version }}
Expand All @@ -42,126 +50,31 @@ jobs:
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DotNet6Version }}
include-prerelease: true

- name: Build Solution
run: dotnet build "/p:Platform=${{ env.BuildPlatform }}" "/p:Configuration=${{ env.BuildConfiguration }}" "/BinaryLogger:${{ env.ArtifactsDirectoryName }}\msbuild.binlog"
run: dotnet build "/Property:Platform=${{ env.BuildPlatform }};Configuration=${{ env.BuildConfiguration }}" "/BinaryLogger:${{ env.ArtifactsDirectoryName }}/build.binlog"

- name: Run Unit Tests (.NET Framework)
run: dotnet test --logger trx --no-restore --no-build --framework net472 /noautorsp

- name: Run Unit Tests (.NET Core 3.1)
run: dotnet test --logger trx --no-restore --no-build --framework netcoreapp3.1 /noautorsp

- name: Run Unit Tests (.NET 6)
run: dotnet test --logger trx --no-restore --no-build --framework net6.0 /noautorsp

- name: Upload Test Results
uses: actions/upload-artifact@v2
if: success() || failure()
with:
name: test-results-win
path: '**/TestResults/*.trx'
if-no-files-found: error

- name: Upload Artifacts
uses: actions/upload-artifact@v2
if: success() || failure()
with:
name: ${{ env.ArtifactsDirectoryName }}-win
path: ${{ env.ArtifactsDirectoryName }}

- name: Push Packages
run: dotnet nuget push --skip-duplicate --api-key ${{ secrets.NuGetApiKey }} ${{ env.ArtifactsDirectoryName }}\**\*.nupkg
if: ${{ startsWith(github.ref, 'refs/tags/v') }}

LinuxBuild:
name: Build and Test (Linux)
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Install .NET Core ${{ env.DotNet3Version }}
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DotNet3Version }}

- name: Install .NET ${{ env.DotNet6Version }}
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DotNet6Version }}
include-prerelease: true

- name: Build Solution
run: dotnet build "/p:Platform=${{ env.BuildPlatform }}" "/p:Configuration=${{ env.BuildConfiguration }}" "/BinaryLogger:${{ env.ArtifactsDirectoryName }}\msbuild.binlog"
if: ${{ matrix.os == 'windows-latest' }}
run: dotnet test --logger trx --no-restore --no-build --framework net472 /noautorsp "/Property:Platform=${{ env.BuildPlatform }};Configuration=${{ env.BuildConfiguration }}" "/BinaryLogger:${{ env.ArtifactsDirectoryName }}/test-net472.binlog"

- name: Run Unit Tests (.NET Core 3.1)
run: dotnet test --logger trx --no-restore --no-build --framework netcoreapp3.1 /noautorsp
run: dotnet test --logger trx --no-restore --no-build --framework netcoreapp3.1 /noautorsp "/Property:Platform=${{ env.BuildPlatform }};Configuration=${{ env.BuildConfiguration }}" "/BinaryLogger:${{ env.ArtifactsDirectoryName }}/test-netcoreapp3.1.binlog"

- name: Run Unit Tests (.NET 6)
run: dotnet test --logger trx --no-restore --no-build --framework net6.0 /noautorsp
run: dotnet test --logger trx --no-restore --no-build --framework net6.0 /noautorsp "/Property:Platform=${{ env.BuildPlatform }};Configuration=${{ env.BuildConfiguration }}" "/BinaryLogger:${{ env.ArtifactsDirectoryName }}/test-net6.0.binlog"

- name: Upload Test Results
uses: actions/upload-artifact@v2
if: success() || failure()
with:
name: test-results-linux
name: test-results-${{ matrix.name }}
path: '**/TestResults/*.trx'
if-no-files-found: error

- name: Upload Artifacts
uses: actions/upload-artifact@v2
if: success() || failure()
with:
name: ${{ env.ArtifactsDirectoryName }}-linux
name: ${{ env.ArtifactsDirectoryName }}-${{ matrix.name }}
path: ${{ env.ArtifactsDirectoryName }}

MacOSBuild:
name: Build and Test (MacOS)
runs-on: macos-latest

steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Install .NET Core ${{ env.DotNet3Version }}
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DotNet3Version }}

- name: Install .NET ${{ env.DotNet6Version }}
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DotNet6Version }}
include-prerelease: true

- name: Build Solution
run: dotnet build "/p:Platform=${{ env.BuildPlatform }}" "/p:Configuration=${{ env.BuildConfiguration }}" "/BinaryLogger:${{ env.ArtifactsDirectoryName }}\msbuild.binlog"

- name: Run Unit Tests (.NET Core 3.1)
run: dotnet test --logger trx --no-restore --no-build --framework netcoreapp3.1 /noautorsp

- name: Run Unit Tests (.NET 6)
run: dotnet test --logger trx --no-restore --no-build --framework net6.0 /noautorsp

- name: Upload Test Results
uses: actions/upload-artifact@v2
if: success() || failure()
with:
name: test-results-macos
path: '**/TestResults/*.trx'
if-no-files-found: error

- name: Upload Artifacts
uses: actions/upload-artifact@v2
if: success() || failure()
with:
name: ${{ env.ArtifactsDirectoryName }}-macos
path: ${{ env.ArtifactsDirectoryName }}

52 changes: 52 additions & 0 deletions .github/workflows/Official.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Official Build

on:
push:
branches:
- main
- rel/*
tags:
- v*.*.*

env:
ArtifactsDirectoryName: 'artifacts'
BuildConfiguration: 'Release'
BuildPlatform: 'Any CPU'
ContinuousIntegrationBuild: 'true'
DotNet3Version: '3.x'
DotNet6Version: '6.x'

jobs:
build:
runs-on: windows-latest
environment: Production

steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Install .NET Core ${{ env.DotNet3Version }}
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DotNet3Version }}

- name: Install .NET ${{ env.DotNet6Version }}
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DotNet6Version }}

- name: Build Solution
run: dotnet build "/Property:Platform=${{ env.BuildPlatform }};Configuration=${{ env.BuildConfiguration }}" "/BinaryLogger:${{ env.ArtifactsDirectoryName }}\build.binlog"

- name: Upload Artifacts
uses: actions/upload-artifact@v2
if: success() || failure()
with:
name: ${{ env.ArtifactsDirectoryName }}
path: ${{ env.ArtifactsDirectoryName }}

- name: Push Packages
run: dotnet nuget push --skip-duplicate --api-key ${{ secrets.NuGetApiKey }} ${{ env.ArtifactsDirectoryName }}\**\*.nupkg
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
5 changes: 3 additions & 2 deletions MSBuildProjectCreator.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29011.400
# Visual Studio Version 17
VisualStudioVersion = 17.2.32516.85
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Build.Utilities.ProjectCreation", "src\Microsoft.Build.Utilities.ProjectCreation\Microsoft.Build.Utilities.ProjectCreation.csproj", "{0CCB62BE-922F-480F-B8EA-823CB8A9CBDC}"
EndProject
Expand Down Expand Up @@ -33,6 +33,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{B7A3C6A3-30B4-4B86-8434-5865A70E2D7C}"
ProjectSection(SolutionItems) = preProject
.github\workflows\CI.yml = .github\workflows\CI.yml
.github\workflows\Official.yml = .github\workflows\Official.yml
EndProjectSection
EndProject
Global
Expand Down
10 changes: 5 additions & 5 deletions Packages.props
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MicrosoftBuildPackageVersion>17.1.0</MicrosoftBuildPackageVersion>
<MicrosoftBuildPackageVersion>17.2.0</MicrosoftBuildPackageVersion>
<MicrosoftBuildPackageVersion Condition="'$(TargetFramework)' == 'netcoreapp3.1'">16.9.0</MicrosoftBuildPackageVersion>
<NuGetPackageVersion>6.1.0</NuGetPackageVersion>
<NuGetPackageVersion>6.2.0</NuGetPackageVersion>
<NuGetPackageVersion Condition="'$(TargetFramework)' == 'netcoreapp3.1'">5.7.1</NuGetPackageVersion>
</PropertyGroup>
<ItemGroup>
Expand All @@ -13,18 +13,18 @@
<PackageReference Update="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="3.3.3" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.1.0" />
<PackageReference Update="Microsoft.VisualStudio.SDK.EmbedInteropTypes" Version="15.0.36" />
<PackageReference Update="Microsoft.VisualStudio.Setup.Configuration.Interop" Version="3.1.2196" />
<PackageReference Update="Microsoft.VisualStudio.Setup.Configuration.Interop" Version="3.2.2146" />
<PackageReference Update="NuGet.Frameworks" Version="$(NuGetPackageVersion)" />
<PackageReference Update="Shouldly" Version="4.0.3" />
<PackageReference Update="System.IO.Compression" Version="4.3.0" />
<PackageReference Update="xunit" Version="2.4.1" />
<PackageReference Update="xunit.runner.visualstudio" Version="2.4.4" />
<PackageReference Update="xunit.runner.visualstudio" Version="2.4.5" />
</ItemGroup>
<ItemGroup>
<GlobalPackageReference Include="Microsoft.Build.Artifacts" Version="4.0.4" />
<GlobalPackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2" />
<GlobalPackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" />
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.5.103" />
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.5.104" />
<GlobalPackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.406" />
<Compile Include="..\Shared\GlobalSuppressions.cs" />
<AdditionalFiles Include="..\Shared\stylecop.json" />
Expand Down
4 changes: 2 additions & 2 deletions version.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": "8.0",
"version": "8.1",
"assemblyVersion": "1.0",
"buildNumberOffset": -11,
"buildNumberOffset": 0,
"nugetPackageVersion": {
"semVer": 2
},
Expand Down