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

V1 branching update #2818

Merged
merged 22 commits into from
Aug 17, 2023
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
64 changes: 37 additions & 27 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,27 @@
name: Publish Terminal.Gui

on:
push:
branches: [ main, v2_release ]
tags:
- v*
paths-ignore:
- '**.md'

pull_request:
branches: [ develop, v2_develop ]
types:
- closed
paths-ignore:
- '**.md'

jobs:
if_merged:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- run: |
echo The PR was merged

publish:
name: Build and Publish to Nuget.org
Expand Down Expand Up @@ -45,34 +62,27 @@ jobs:
- name: Pack
run: dotnet pack -c Release --include-symbols -p:Version='${{ steps.gitversion.outputs.SemVer }}'

- name: Test to generate Code Coverage Report
run: |
sed -i 's/"stopOnFail": false/"stopOnFail": true/g' UnitTests/xunit.runner.json
dotnet test --verbosity normal --collect:"XPlat Code Coverage" --settings UnitTests/coverlet.runsettings
mv -v UnitTests/TestResults/*/*.* UnitTests/TestResults/
# - name: Test to generate Code Coverage Report
# run: |
# sed -i 's/"stopOnFail": false/"stopOnFail": true/g' UnitTests/xunit.runner.json
# dotnet test --verbosity normal --collect:"XPlat Code Coverage" --settings UnitTests/coverlet.runsettings
# mv -v UnitTests/TestResults/*/*.* UnitTests/TestResults/

- name: Create Test Coverage Badge
uses: simon-k/[email protected]
id: create_coverage_badge
with:
label: Unit Test Coverage
color: brightgreen
path: UnitTests/TestResults/coverage.opencover.xml
gist-filename: code-coverage.json
# https://gist.github.com/migueldeicaza/90ef67a684cb71db1817921a970f8d27
gist-id: 90ef67a684cb71db1817921a970f8d27
gist-auth-token: ${{ secrets.GIST_AUTH_TOKEN }}
# - name: Create Test Coverage Badge
# uses: simon-k/[email protected]
# id: create_coverage_badge
# with:
# label: Unit Test Coverage
# color: brightgreen
# path: UnitTests/TestResults/coverage.opencover.xml
# gist-filename: code-coverage.json
# gist-id: 90ef67a684cb71db1817921a970f8d27
# gist-auth-token: ${{ secrets.GIST_AUTH_TOKEN }}

- name: Print Code Coverage
run: |
echo "Code coverage percentage: ${{steps.create_coverage_badge.outputs.percentage}}%"
echo "Badge data: ${{steps.create_coverage_badge.outputs.badge}}"
# - name: Print Code Coverage
# run: |
# echo "Code coverage percentage: ${{steps.create_coverage_badge.outputs.percentage}}%"
# echo "Badge data: ${{steps.create_coverage_badge.outputs.badge}}"

#- name: Prep GitHub Packages
# run: dotnet nuget add source --username tig --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/tig/index.json"

#- name: Publish to GitHub packages
# run: dotnet nuget push NStack/bin/Release/*.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source "github"

- name: Publish to NuGet.org
run: dotnet nuget push Terminal.Gui/bin/Release/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json
run: dotnet nuget push Terminal.Gui/bin/Release/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }}
9 changes: 4 additions & 5 deletions Example/Example.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<!-- Version numbers are automatically updated by gitversion when a release is released -->
<!-- In the source tree the version will always be 1.0 for all projects. -->
<!-- Do not modify these. -->
<AssemblyVersion>1.13.6.0</AssemblyVersion>
<FileVersion>1.13.6.0</FileVersion>
<Version>1.13.6-pre0002</Version>
<InformationalVersion>1.13.6-pre.2+Branch.develop.Sha.90208d6577b9d34bf0c4e9057b4227297bc9118d</InformationalVersion>
<AssemblyVersion>1.14.0.0</AssemblyVersion>
<FileVersion>1.14.0.0</FileVersion>
<Version>1.14.0</Version>
<InformationalVersion>1.14.0+Branch.v1-develop-branching-update.Sha.f47377ce8ba5a97f2f84c745eca04c336b094e96</InformationalVersion>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Terminal.Gui\Terminal.Gui.csproj" />
Expand Down
8 changes: 4 additions & 4 deletions FSharpExample/FSharpExample.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<AssemblyVersion>1.13.6.0</AssemblyVersion>
<FileVersion>1.13.6.0</FileVersion>
<InformationalVersion>1.13.6-pre.2+Branch.develop.Sha.90208d6577b9d34bf0c4e9057b4227297bc9118d</InformationalVersion>
<Version>1.13.6-pre0002</Version>
<AssemblyVersion>1.14.0.0</AssemblyVersion>
<FileVersion>1.14.0.0</FileVersion>
<InformationalVersion>1.14.0+Branch.v1-develop-branching-update.Sha.f47377ce8ba5a97f2f84c745eca04c336b094e96</InformationalVersion>
<Version>1.14.0</Version>
</PropertyGroup>
<ItemGroup>
<Compile Include="Program.fs" />
Expand Down
12 changes: 5 additions & 7 deletions GitVersion.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
mode: ContinuousDeployment
tag-prefix: '[vV]'
continuous-delivery-fallback-tag: 'pre'
branches:
develop:
tag: pre
mode: ContinuousDeployment
tag: pre.{BranchName}
main:
tag: rc
increment: Patch
source-branches:
- develop
- release
- main
feature:
tag: useBranchName
regex: ^features?[/-]
source-branches:
- develop
- main
- release
- feature
- support
- hotfix
pull-request:
tag: PullRequest
tag: PullRequest.{BranchName}
increment: Inherit
ignore:
sha: []
Expand Down
9 changes: 4 additions & 5 deletions ReactiveExample/ReactiveExample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<!-- Version numbers are automatically updated by gitversion when a release is released -->
<!-- In the source tree the version will always be 2.0 for all projects. -->
<!-- Do not modify these. -->
<AssemblyVersion>1.13.6.0</AssemblyVersion>
<FileVersion>1.13.6.0</FileVersion>
<Version>1.13.6-pre0002</Version>
<InformationalVersion>1.13.6-pre.2+Branch.develop.Sha.90208d6577b9d34bf0c4e9057b4227297bc9118d</InformationalVersion>
<AssemblyVersion>1.14.0.0</AssemblyVersion>
<FileVersion>1.14.0.0</FileVersion>
<Version>1.14.0</Version>
<InformationalVersion>1.14.0+Branch.v1-develop-branching-update.Sha.f47377ce8ba5a97f2f84c745eca04c336b094e96</InformationalVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ReactiveUI.Fody" Version="19.4.1" />
Expand Down
80 changes: 51 additions & 29 deletions Terminal.Gui/Terminal.Gui.csproj
Original file line number Diff line number Diff line change
@@ -1,30 +1,51 @@
<Project Sdk="Microsoft.NET.Sdk">
<!-- =================================================================== -->
<!-- Version numbers -->
<!-- Automatically updated by gitversion (run `dotnet-gitversion /updateprojectfiles`) -->
<!-- GitVersion.xml controls settings -->
<!-- =================================================================== -->
<PropertyGroup>
<AssemblyVersion>1.14.0.0</AssemblyVersion>
<FileVersion>1.14.0.0</FileVersion>
<InformationalVersion>1.14.0+Branch.v1-develop-branching-update.Sha.f47377ce8ba5a97f2f84c745eca04c336b094e96</InformationalVersion>
<PackageVersion>$(Version)</PackageVersion>
<Version>1.14.0</Version>
</PropertyGroup>
<!-- =================================================================== -->
<!-- .NET Build Settings -->
<!-- =================================================================== -->
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>portable</DebugType>
<VersionSuffix></VersionSuffix>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DefineConstants>TRACE;DEBUG_IDISPOSABLE</DefineConstants>
<DebugType>portable</DebugType>
</PropertyGroup>
<PropertyGroup>
<!-- Version numbers are automatically updated by gitversion when a release is released -->
<!-- In the source tree the version will always be 1.0 for all projects. -->
<!-- Do not modify these. Do NOT commit after manually running `dotnet-gitversion /updateprojectfiles` -->
<AssemblyVersion>1.13.6.0</AssemblyVersion>
<FileVersion>1.13.6.0</FileVersion>
<InformationalVersion>1.13.6-pre.2+Branch.develop.Sha.90208d6577b9d34bf0c4e9057b4227297bc9118d</InformationalVersion>
<Version>1.13.6-pre0002</Version>
<TargetFrameworks>net472;netstandard2.1;net7.0</TargetFrameworks>
<RootNamespace>Terminal.Gui</RootNamespace>
<AssemblyName>Terminal.Gui</AssemblyName>
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
</PropertyGroup>
<!-- =================================================================== -->
<!-- Dependencies -->
<!-- =================================================================== -->
<ItemGroup>
<PackageReference Include="NStack.Core" Version="1.0.7" />
<PackageReference Include="System.Management" Version="7.0.2" />
<!-- Enable Nuget Source Link for github -->
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<InternalsVisibleTo Include="UnitTests" />
</ItemGroup>
<!-- Uncomment the RestoreSources element to have dotnet restore pull NStack from a local dir for testing -->
<PropertyGroup>
<!-- Uncomment the RestoreSources element to have dotnet restore pull NStack from a local dir for testing -->
<!-- See https://stackoverflow.com/a/44463578/297526 -->
<!--<RestoreSources>$(RestoreSources);..\..\NStack\NStack\bin\Debug;https://api.nuget.org/v3/index.json</RestoreSources>-->
</PropertyGroup>
<!-- =================================================================== -->
<!-- API Documentation -->
<!-- =================================================================== -->
<ItemGroup>
<None Include="..\docfx\images\logo.png">
<Pack>True</Pack>
Expand All @@ -35,6 +56,9 @@
<PackagePath>\</PackagePath>
</None>
</ItemGroup>
<!-- =================================================================== -->
<!-- i18 -->
<!-- =================================================================== -->
<ItemGroup>
<Compile Update="Resources\Strings.Designer.cs">
<DesignTime>True</DesignTime>
Expand All @@ -48,39 +72,37 @@
<LastGenOutput>Strings.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<!-- Enable Nuget Source Link for github -->
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="System.Management" Version="7.0.2" />
</ItemGroup>
<!-- =================================================================== -->
<!-- Nuget -->
<!-- =================================================================== -->
<PropertyGroup>
<TargetFrameworks>net472;netstandard2.1;net7.0</TargetFrameworks>
<RootNamespace>Terminal.Gui</RootNamespace>
<AssemblyName>Terminal.Gui</AssemblyName>
<DocumentationFile>bin\Release\Terminal.Gui.xml</DocumentationFile>
<GenerateDocumentationFile Condition=" '$(Configuration)' == 'Release' ">true</GenerateDocumentationFile>
<GeneratePackageOnBuild Condition=" '$(Configuration)' == 'Debug' ">true</GeneratePackageOnBuild>
<PackageId>Terminal.Gui</PackageId>
<PackageVersion>$(PackageVersion)</PackageVersion>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/gui-cs/Terminal.Gui/</PackageProjectUrl>
<RepositoryUrl>https://github.com/gui-cs/Terminal.Gui.git</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<!-- Publish the repository URL in the built .nupkg (in the NuSpec <Repository> element) -->
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<!-- Embed source files that are not tracked by the source control manager in the PDB -->
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<PackageIcon>logo.png</PackageIcon>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageTags>csharp, terminal, c#, f#, gui, toolkit, console, tui</PackageTags>
<Description>Cross platform Terminal UI toolkit for .NET</Description>
<Owners>Miguel de Icaza, Charlie Kindel</Owners>
<Owners>Miguel de Icaza, Tig Kindel</Owners>
<Summary>A toolkit for building rich console apps for .NET that works on Windows, Mac, and Linux/Unix.</Summary>
<Title>Terminal.Gui - Cross platform Terminal User Interface (TUI) toolkit for .NET</Title>
<PackageReleaseNotes>
See: https://github.com/gui-cs/Terminal.Gui/releases
</PackageReleaseNotes>
<DocumentationFile>bin\Release\Terminal.Gui.xml</DocumentationFile>
<GeneratePackageOnBuild Condition=" '$(Configuration)' == 'Debug' ">true</GeneratePackageOnBuild>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<RepositoryUrl>https://github.com/gui-cs/Terminal.Gui.git</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<!-- Publish the repository URL in the built .nupkg (in the NuSpec <Repository> element) -->
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<!-- Embed source files that are not tracked by the source control manager in the PDB -->
<GitRepositoryRemoteName>upstream</GitRepositoryRemoteName>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<EnableSourceLink>true</EnableSourceLink>
<DebugType>Embedded</DebugType>
<Authors>Miguel de Icaza, Tig Kindel (@tig), @BDisp</Authors>
</PropertyGroup>
</Project>
3 changes: 3 additions & 0 deletions Terminal.sln
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
CODE_OF_CONDUCT.md = CODE_OF_CONDUCT.md
CONTRIBUTING.md = CONTRIBUTING.md
.github\workflows\dotnet-core.yml = .github\workflows\dotnet-core.yml
GitVersion.yml = GitVersion.yml
global.json = global.json
nuget.config = nuget.config
.github\workflows\publish.yml = .github\workflows\publish.yml
README.md = README.md
testenvironments.json = testenvironments.json
Expand Down
11 changes: 5 additions & 6 deletions UICatalog/UICatalog.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@
<TargetFramework>net7.0</TargetFramework>
<LangVersion>8.0</LangVersion>
<StartupObject>UICatalog.UICatalogApp</StartupObject>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<!-- Version numbers are automatically updated by gitversion when a release is released -->
<!-- In the source tree the version will always be 2.0 for all projects. -->
<!-- Do not modify these. -->
<AssemblyVersion>1.13.6.0</AssemblyVersion>
<FileVersion>1.13.6.0</FileVersion>
<Version>1.13.6-pre0002</Version>
<InformationalVersion>1.13.6-pre.2+Branch.develop.Sha.90208d6577b9d34bf0c4e9057b4227297bc9118d</InformationalVersion>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<AssemblyVersion>1.14.0.0</AssemblyVersion>
<FileVersion>1.14.0.0</FileVersion>
<Version>1.14.0</Version>
<InformationalVersion>1.14.0+Branch.v1-develop-branching-update.Sha.f47377ce8ba5a97f2f84c745eca04c336b094e96</InformationalVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DefineConstants>TRACE</DefineConstants>
Expand Down
11 changes: 5 additions & 6 deletions UnitTests/UnitTests.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<!-- https://stackoverflow.com/questions/294216/why-does-c-sharp-forbid-generic-attribute-types -->
Expand All @@ -7,12 +7,11 @@
<IsPackable>false</IsPackable>
<UseDataCollector />
<!-- Version numbers are automatically updated by gitversion when a release is released -->
<!-- In the source tree the version will always be 2.0 for all projects. -->
<!-- Do not modify these. -->
<AssemblyVersion>1.13.6.0</AssemblyVersion>
<FileVersion>1.13.6.0</FileVersion>
<Version>1.13.6-pre0002</Version>
<InformationalVersion>1.13.6-pre.2+Branch.develop.Sha.90208d6577b9d34bf0c4e9057b4227297bc9118d</InformationalVersion>
<AssemblyVersion>1.14.0.0</AssemblyVersion>
<FileVersion>1.14.0.0</FileVersion>
<Version>1.14.0</Version>
<InformationalVersion>1.14.0+Branch.v1-develop-branching-update.Sha.f47377ce8ba5a97f2f84c745eca04c336b094e96</InformationalVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DefineConstants>TRACE</DefineConstants>
Expand Down
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk":{
"version":"7.0.100",
"rollForward":"latestMajor"
"version":"7.0.200",
"rollForward":"latestMinor"
}
}
12 changes: 12 additions & 0 deletions nuget.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<config>
<add key="defaultPushSource" value="https://api.nuget.org/v3/index.json" />
</config>
<packageSources>

<!--To inherit the global NuGet package sources remove the <clear/> line below -->
<clear />
<add key="nuget" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>
Loading