Skip to content

Commit

Permalink
Merge branch 'release/0.13.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
9swampy committed Nov 20, 2024
2 parents cddb783 + b64c9b4 commit 4514c96
Show file tree
Hide file tree
Showing 28 changed files with 390 additions and 307 deletions.
7 changes: 5 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,20 @@ insert_final_newline = true
trim_trailing_whitespace = true
csharp_indent_labels = one_less_than_current
csharp_using_directive_placement = inside_namespace:error
csharp_prefer_simple_using_statement = false:suggestion
csharp_prefer_simple_using_statement = false:error
csharp_prefer_braces = true:silent
csharp_style_namespace_declarations = block_scoped:silent
csharp_style_prefer_method_group_conversion = true:silent
csharp_style_expression_bodied_methods = false:none
csharp_style_expression_bodied_constructors = false:none
csharp_style_expression_bodied_operators = false:none
csharp_style_expression_bodied_properties = true:suggestion
csharp_style_expression_bodied_properties = true:none
csharp_style_expression_bodied_indexers = true:none
csharp_style_expression_bodied_accessors = true:none
csharp_style_expression_bodied_lambdas = true:silent
csharp_style_expression_bodied_local_functions = false:silent
csharp_style_prefer_top_level_statements = true:silent
csharp_style_prefer_primary_constructors = true:suggestion

# Code files
[*.{cs,csx,vb,vbx}]
Expand Down Expand Up @@ -369,3 +371,4 @@ dotnet_diagnostic.xUnit1004.severity = warning

# VSTHRD200: Use "Async" suffix for async methods
dotnet_diagnostic.VSTHRD200.severity = suggestion
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
38 changes: 26 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,18 @@ jobs:
run: msbuild $env:Solution_Name /p:Configuration=Debug /p:Platform="Any CPU"

- name: Telnet.CiTests
uses: rusty-bender/vstest-action@main
uses: rusty-bender/vstest-action@main
with:
testAssembly: PrimS.Telnet.CiTests.dll
searchFolder: ./**/bin/Debug/**/
runInParallel: true

- name: Remove File
uses: JesseTG/rm@v1.0.3
if: startsWith(github.ref, 'refs/heads/release/')
with:
path: ../../_actions/rusty-bender/vstest-action/main/dist

# Can't apparently run both full fat and core test suites together.'
- name: Telnet.*.CiTests
uses: rusty-bender/vstest-action@main
Expand All @@ -61,23 +67,27 @@ jobs:

- name: Run GitVersion
run: |
dotnet-gitversion /showConfig
$str = dotnet-gitversion /updateprojectfiles | out-string
$json = ConvertFrom-Json $str
$json
$semVer = $json.SemVer
$fullSemVer = $json.FullSemVer
$nuGetVersionV2 = $json.NuGetVersionV2
$buildMetaDataPadded = $json.BuildMetaDataPadded
$nuGetVersionV2 = $json.MajorMinorPatch
$buildMetaDataPadded = "$($json.MajorMinorPatch)$($json.PreReleaseTagWithDash)$($json.WeightedPreReleaseNumber)"
Write-Host $json
Write-Host $semVer
Write-Host $fullSemVer
Write-Host $nuGetVersionV2
Write-Host "semVer:" $semVer
Write-Host "fullSemVer:" $fullSemVer
Write-Host "nuGetVersionV2:" $nuGetVersionV2
Write-Host "Pre buildMetaDataPadded:" $buildMetaDataPadded
if (${buildMetaDataPadded} = "0000") {
${buildMetaDataPadded} = ''
}
Write-Host ${nuGetVersionV2}${buildMetaDataPadded}
Write-Host "Post buildMetaDataPadded:" $buildMetaDataPadded
Write-Host "NuGetVersionV2ext:${nuGetVersionV2}${buildMetaDataPadded}"
echo "FullSemVer=$fullSemVer" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
echo "SemVer=$semVer" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
echo "NuGetVersionV2=$nuGetVersionV2" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
Expand All @@ -87,22 +97,26 @@ jobs:
run: msbuild $env:Solution_Name /p:Configuration=Release /p:Platform="Any CPU"

- name: Nuget pack
run: nuget pack Telnet.nuspec -Version $Env:NuGetVersionV2ext
run: nuget pack Telnet.nuspec -Version $Env:SemVer

# Navigate to https://github.com/settings/tokens and check to see if the old token has expired
# https://github.com/settings/tokens to create a new classic token, permission write:packages, name & copy paste to PUBLISH_TO_GITHUB_PACKAGES
# Navigate to repo->Settings->Secrets and variables->Actions and check PUBLISH_TO_GITHUB_PACKAGES
- name: Publish to GitHub
run: dotnet nuget push "Telnet.$Env:NuGetVersionV2ext.nupkg" --api-key ${{ secrets.PUBLISH_TO_GITHUB_PACKAGES }} --source "https://nuget.pkg.github.com/9swampy/index.json"
run: dotnet nuget push "Telnet.$Env:SemVer.nupkg" --api-key ${{ secrets.PUBLISH_TO_GITHUB_PACKAGES }} --source "https://nuget.pkg.github.com/9swampy/index.json"

- name: Nuget pack
if: github.ref == 'refs/heads/master'
run: nuget pack Telnet.nuspec -Version $Env:NuGetVersionV2

# Login to Nuget 9swampy->Api Keys and regenerate, copy to...
# GitHub navigate to repo->Settings->Secrets and variables->Actions and set NUGET_APIKEY
- name: Publish to Nuget
if: github.ref == 'refs/heads/master'
run: nuget push "Telnet.$Env:NuGetVersionV2ext.nupkg" ${{ secrets.NUGET_APIKEY }} -source https://api.nuget.org/v3/index.json
run: nuget push "Telnet.$Env:NuGetVersionV2.nupkg" ${{ secrets.NUGET_APIKEY }} -source https://api.nuget.org/v3/index.json

- name: Upload Artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: published-nuget-package
path: Telnet.*.nupkg
Expand Down
16 changes: 7 additions & 9 deletions NetStandard.CiTests/PrimS.Telnet.NetStandard.CiTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,16 @@
<Compile Include="..\PrimS.Telnet.CiTests\WriteHandlerBase.cs" Link="WriteHandlerBase.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="FakeItEasy" Version="7.3.1" />
<PackageReference Include="FluentAssertions" Version="6.7.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.2.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.10" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.10" />
<PackageReference Include="coverlet.collector" Version="3.1.2">
<PackageReference Include="FakeItEasy" Version="8.3.0" />
<PackageReference Include="FluentAssertions" Version="6.12.2" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.11.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Loading

0 comments on commit 4514c96

Please sign in to comment.