Skip to content

Commit b21e07e

Browse files
Update dependencies
* Add support for C# 12 * Run all tests on all major .NET SDKs * Only build on Ubuntu * Do not build docs for pull requests * Add Cédric Luthi, and Frank Ray to authors * Drop netstandard2.0 for ImageSharp plugin
1 parent 703d653 commit b21e07e

File tree

57 files changed

+173
-421
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+173
-421
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -8,66 +8,14 @@ env:
88

99
jobs:
1010

11-
###################################################
12-
# DOCS
13-
###################################################
14-
15-
docs:
16-
name: Documentation
17-
runs-on: ubuntu-latest
18-
steps:
19-
- name: Checkout
20-
uses: actions/checkout@master
21-
22-
- name: Setup .NET SDK
23-
uses: actions/setup-dotnet@v3
24-
25-
- name: Setup Node.js
26-
uses: actions/setup-node@v3
27-
with:
28-
node-version: '16'
29-
30-
- name: Cache dependencies
31-
uses: actions/cache@v3
32-
with:
33-
path: ~/.npm
34-
key: npm-${{ hashFiles('package-lock.json') }}
35-
restore-keys: npm-
36-
37-
- name: Build
38-
shell: bash
39-
env:
40-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41-
run: |
42-
cd docs
43-
dotnet tool restore
44-
dotnet run --configuration Release
45-
46-
- name: Archive doc generation
47-
uses: actions/upload-artifact@v3
48-
with:
49-
name: documentation-output
50-
path: docs/output/
51-
retention-days: 5
52-
5311
###################################################
5412
# BUILD
5513
###################################################
5614

5715
build:
5816
name: Build
5917
if: "!contains(github.event.head_commit.message, 'skip-ci')"
60-
strategy:
61-
matrix:
62-
kind: ['linux', 'windows', 'macOS']
63-
include:
64-
- kind: linux
65-
os: ubuntu-latest
66-
- kind: windows
67-
os: windows-latest
68-
- kind: macOS
69-
os: macos-latest
70-
runs-on: ${{ matrix.os }}
18+
runs-on: ubuntu-latest
7119
steps:
7220
- name: Checkout
7321
uses: actions/checkout@v3

.github/workflows/publish.yaml

Lines changed: 14 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,13 @@ env:
1515
jobs:
1616

1717
###################################################
18-
# BUILD
18+
# PUBLISH
1919
###################################################
2020

2121
build:
22-
name: Build
23-
if: |
24-
(!startsWith(github.event.head_commit.message, 'skip-ci')
25-
&& !startsWith(github.event.head_commit.message, 'chore:'))
26-
|| startsWith(github.ref, 'refs/tags/')
27-
strategy:
28-
matrix:
29-
kind: ['linux', 'windows', 'macOS']
30-
include:
31-
- kind: linux
32-
os: ubuntu-latest
33-
- kind: windows
34-
os: windows-latest
35-
- kind: macOS
36-
os: macos-latest
37-
runs-on: ${{ matrix.os }}
22+
name: Publish NuGet Packages
23+
if: "!contains(github.event.head_commit.message, 'skip-ci') || startsWith(github.ref, 'refs/tags/')"
24+
runs-on: ubuntu-latest
3825
steps:
3926
- name: Checkout
4027
uses: actions/checkout@v3
@@ -43,12 +30,19 @@ jobs:
4330

4431
- name: Setup .NET SDK
4532
uses: actions/setup-dotnet@v3
33+
with:
34+
dotnet-version: |
35+
6.0.x
36+
7.0.x
37+
8.0.x
4638
47-
- name: Build
39+
- name: Publish
4840
shell: bash
4941
run: |
5042
dotnet tool restore
51-
dotnet cake
43+
dotnet cake --target="publish" \
44+
--nuget-key="${{secrets.NUGET_API_KEY}}" \
45+
--github-key="${{secrets.GITHUB_TOKEN}}"
5246
5347
###################################################
5448
# DOCS
@@ -88,35 +82,4 @@ jobs:
8882
run: |
8983
cd docs
9084
dotnet tool restore
91-
dotnet run --configuration Release -- deploy
92-
93-
###################################################
94-
# PUBLISH
95-
###################################################
96-
97-
publish:
98-
name: Publish NuGet Packages
99-
needs: [build]
100-
if: "!contains(github.event.head_commit.message, 'skip-ci') || startsWith(github.ref, 'refs/tags/')"
101-
runs-on: ubuntu-latest
102-
steps:
103-
- name: Checkout
104-
uses: actions/checkout@v3
105-
with:
106-
fetch-depth: 0
107-
108-
- name: Setup .NET SDK
109-
uses: actions/setup-dotnet@v3
110-
with:
111-
dotnet-version: |
112-
6.0.x
113-
7.0.x
114-
8.0.x
115-
116-
- name: Publish
117-
shell: bash
118-
run: |
119-
dotnet tool restore
120-
dotnet cake --target="publish" \
121-
--nuget-key="${{secrets.NUGET_API_KEY}}" \
122-
--github-key="${{secrets.GITHUB_TOKEN}}"
85+
dotnet run --configuration Release -- deploy

src/Directory.Build.props

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project>
22
<PropertyGroup Label="Settings">
33
<Deterministic>true</Deterministic>
4-
<LangVersion>10</LangVersion>
4+
<LangVersion>12</LangVersion>
55
<DebugSymbols>true</DebugSymbols>
66
<DebugType>embedded</DebugType>
77
<MinVerSkip Condition="'$(Configuration)' == 'Debug'">true</MinVerSkip>
@@ -15,8 +15,8 @@
1515

1616
<PropertyGroup Label="Package Information">
1717
<Description>A library that makes it easier to create beautiful console applications.</Description>
18-
<Copyright>Patrik Svensson, Phil Scott, Nils Andresen</Copyright>
19-
<Authors>Patrik Svensson, Phil Scott, Nils Andresen</Authors>
18+
<Copyright>Patrik Svensson, Phil Scott, Nils Andresen, Cédric Luthi, Frank Ray</Copyright>
19+
<Authors>Patrik Svensson, Phil Scott, Nils Andresen, Cédric Luthi, Frank Ray</Authors>
2020
<RepositoryType>git</RepositoryType>
2121
<RepositoryUrl>https://github.com/spectreconsole/spectre.console</RepositoryUrl>
2222
<PackageIcon>small-logo.png</PackageIcon>
@@ -33,12 +33,12 @@
3333

3434
<!-- Allow folks to build with minimal dependencies (though they will need to provide their own Version data) -->
3535
<ItemGroup Label="Build Tools Package References" Condition="'$(UseBuildTimeTools)' != 'false'">
36-
<PackageReference Include="MinVer" PrivateAssets="All" Version="4.2.0" />
37-
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" Version="1.1.1" />
38-
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.435">
36+
<PackageReference Include="MinVer" PrivateAssets="All" Version="4.3.0" />
37+
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" Version="8.0.0" />
38+
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556">
3939
<PrivateAssets>All</PrivateAssets>
4040
</PackageReference>
41-
<PackageReference Include="Roslynator.Analyzers" Version="4.1.2">
41+
<PackageReference Include="Roslynator.Analyzers" Version="4.10.0">
4242
<PrivateAssets>All</PrivateAssets>
4343
</PackageReference>
4444
</ItemGroup>

src/Directory.Build.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project>
22
<Target Name="Versioning" BeforeTargets="MinVer">
33
<PropertyGroup Label="Build">
4-
<MinVerDefaultPreReleasePhase>preview</MinVerDefaultPreReleasePhase>
4+
<MinVerDefaultPreReleaseIdentifiers>preview.0</MinVerDefaultPreReleaseIdentifiers>
55
<MinVerVerbosity>normal</MinVerVerbosity>
66
</PropertyGroup>
77
</Target>

src/Spectre.Console.Cli/Spectre.Console.Cli.csproj

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,19 @@
3131
</PackageReference>
3232
</ItemGroup>
3333

34-
<ItemGroup>
35-
<Compile Update="Resources\HelpProvider.Designer.cs">
36-
<DesignTime>True</DesignTime>
37-
<AutoGen>True</AutoGen>
38-
<DependentUpon>HelpProvider.resx</DependentUpon>
39-
</Compile>
34+
<ItemGroup>
35+
<Compile Update="Resources\HelpProvider.Designer.cs">
36+
<DesignTime>True</DesignTime>
37+
<AutoGen>True</AutoGen>
38+
<DependentUpon>HelpProvider.resx</DependentUpon>
39+
</Compile>
4040
</ItemGroup>
4141

42-
<ItemGroup>
43-
<EmbeddedResource Update="Resources\HelpProvider.resx">
44-
<Generator>ResXFileCodeGenerator</Generator>
45-
<LastGenOutput>HelpProvider.Designer.cs</LastGenOutput>
46-
</EmbeddedResource>
42+
<ItemGroup>
43+
<EmbeddedResource Update="Resources\HelpProvider.resx">
44+
<Generator>ResXFileCodeGenerator</Generator>
45+
<LastGenOutput>HelpProvider.Designer.cs</LastGenOutput>
46+
</EmbeddedResource>
4747
</ItemGroup>
4848

4949
</Project>

src/Spectre.Console.ImageSharp/Spectre.Console.ImageSharp.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net8.0;net7.0;net6.0;netstandard2.0</TargetFrameworks>
4+
<TargetFrameworks>net8.0;net7.0;net6.0</TargetFrameworks>
55
<Nullable>enable</Nullable>
66
<IsPackable>true</IsPackable>
77
<Description>A library that extends Spectre.Console with ImageSharp superpowers.</Description>
@@ -13,7 +13,7 @@
1313
</ItemGroup>
1414

1515
<ItemGroup>
16-
<PackageReference Include="SixLabors.ImageSharp" Version="2.1.3" />
16+
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.2" />
1717
</ItemGroup>
1818

1919
<ItemGroup>

src/Spectre.Console.Json/Spectre.Console.Json.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<Compile Include="..\Spectre.Console\Internal\Extensions\EnumerableExtensions.cs" Link="Internal\EnumerableExtensions.cs" />
1414
<Compile Include="..\Spectre.Console\Internal\Text\StringBuffer.cs" Link="Internal\StringBuffer.cs" />
1515
</ItemGroup>
16-
16+
1717
<ItemGroup>
1818
<AdditionalFiles Include="..\stylecop.json" Link="Properties/stylecop.json" />
1919
<None Include="../../resources/gfx/small-logo.png" Pack="true" PackagePath="\" Link="Properties/small-logo.png" />

src/Spectre.Console.Testing/Spectre.Console.Testing.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net8.0;net7.0;net6.0;netstandard2.0</TargetFrameworks>
4+
<TargetFrameworks>net8.0;net7.0;net6.0</TargetFrameworks>
55
<IsTestProject>false</IsTestProject>
66
<Nullable>enable</Nullable>
77
<IsPackable>true</IsPackable>

src/Spectre.Console/Spectre.Console.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
</ItemGroup>
1717

1818
<ItemGroup>
19-
<PackageReference Include="System.Memory" Version="4.5.5" />
20-
<PackageReference Include="Wcwidth.Sources" Version="1.0.0">
19+
<PackageReference Condition="'$(TargetFramework)' == 'netstandard2.0'" Include="System.Memory" Version="4.5.5" />
20+
<PackageReference Include="Wcwidth.Sources" Version="2.0.0">
2121
<PrivateAssets>all</PrivateAssets>
2222
</PackageReference>
2323
</ItemGroup>

test/Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
</PropertyGroup>
77

88
<ItemGroup Label="Package References">
9-
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.435">
9+
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556">
1010
<PrivateAssets>All</PrivateAssets>
1111
</PackageReference>
12-
<PackageReference Include="Roslynator.Analyzers" Version="4.1.2">
12+
<PackageReference Include="Roslynator.Analyzers" Version="4.10.0">
1313
<PrivateAssets>All</PrivateAssets>
1414
</PackageReference>
1515
</ItemGroup>

0 commit comments

Comments
 (0)