Skip to content

Commit

Permalink
changes source gen folder structure and fixed git workflow for publis…
Browse files Browse the repository at this point in the history
…hing nugget
  • Loading branch information
saivineeth100 committed Feb 6, 2024
1 parent 3c42558 commit 99fca8a
Show file tree
Hide file tree
Showing 21 changed files with 64 additions and 32 deletions.
18 changes: 5 additions & 13 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ on:
tags:
- "V*"
env:
PROJECT1_PATH: "src/TallyConnector.Core/TallyConnector.Core.csproj"
PROJECT2_PATH: "src/TallyConnector/TallyConnector.csproj"
PROJECT3_PATH: "src/TallyConnector.SourceGenerators/TallyConnector.SourceGenerators.csproj"
SOLUTION_PATH: "TallyConnectorr_Nugget.sln"
PACKAGE_OUTPUT_DIRECTORY: ${{ github.workspace }}\output
NUGET_SOURCE_URL: "https://api.nuget.org/v3/index.json"
jobs:
Expand All @@ -28,15 +26,9 @@ jobs:
run: echo "NUGGET_VERSION=$("${{github.ref_name}}".replace('V',''))" >> $env:GITHUB_ENV
# - name: TEST Tag
# run: echo $env:NUGGET_VERSION
- name: Restore dependencies
run: dotnet restore ${{ env.PROJECT1_PATH }} && dotnet restore ${{ env.PROJECT2_PATH }} && dotnet restore ${{ env.PROJECT3_PATH }}
- name: "Build projects"
run: dotnet build ${{ env.PROJECT1_PATH }} --configuration Release /p:VersionPrefix=$env:NUGGET_VERSION && dotnet build ${{ env.PROJECT2_PATH }} --configuration Release /p:VersionPrefix=$env:NUGGET_VERSION && dotnet build ${{ env.PROJECT3_PATH }} --configuration Release /p:VersionPrefix=$env:NUGGET_VERSION
- name: "Pack project1"
run: dotnet pack ${{ env.PROJECT1_PATH }} --no-restore --no-build --configuration Release --output ${{ env.PACKAGE_OUTPUT_DIRECTORY }} /p:VersionPrefix=$env:NUGGET_VERSION
- name: "Pack project2"
run: dotnet pack ${{ env.PROJECT2_PATH }} --no-restore --no-build --configuration Release --output ${{ env.PACKAGE_OUTPUT_DIRECTORY }} /p:VersionPrefix=$env:NUGGET_VERSION
- name: "Pack project3"
run: dotnet pack ${{ env.PROJECT3_PATH }} --no-restore --no-build --configuration Release --output ${{ env.PACKAGE_OUTPUT_DIRECTORY }} /p:VersionPrefix=$env:NUGGET_VERSION
- name: "Build Solution"
run: dotnet build ${{ env.SOLUTION_PATH }} --configuration Release /p:VersionPrefix=$env:NUGGET_VERSION
- name: "Pack All Projects in Solution"
run: dotnet pack ${{ env.SOLUTION_PATH }} --no-restore --no-build --configuration Release --output ${{ env.PACKAGE_OUTPUT_DIRECTORY }} /p:VersionPrefix=$env:NUGGET_VERSION
- name: "Push package"
run: dotnet nuget push ${{ env.PACKAGE_OUTPUT_DIRECTORY }}\*.nupkg -k ${{ secrets.NUGGET_KEY }} -s ${{ env.NUGET_SOURCE_URL }}
2 changes: 0 additions & 2 deletions Examples/CustomService/CustomService.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
</PropertyGroup>

<ItemGroup>

<ProjectReference Include="..\..\src\SourceGenerators\TC.TDLReportSourceGenerator\TC.TDLReportSourceGenerator.csproj" OutputItemType="Analyzer" />
<ProjectReference Include="..\..\src\TallyConnector\TallyConnector.csproj" />
</ItemGroup>

Expand Down
3 changes: 0 additions & 3 deletions Examples/CustomService/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ private static async Task Main(string[] args)
{
Console.WriteLine("Hello, World!");
await Test();



}
public static async Task Test()
{
Expand Down
22 changes: 11 additions & 11 deletions TallyConnector.sln
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Generators", "Generators",
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{67D1D28B-FF22-44C5-8DA8-7ED316213B40}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TC.TDLReportSourceGenerator", "src\SourceGenerators\TC.TDLReportSourceGenerator\TC.TDLReportSourceGenerator.csproj", "{54AB2077-322D-41AF-9E85-417BF774E72C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests", "src\Tests\Tests\Tests.csproj", "{47FE5A4F-FA54-4761-8257-75FDD6615535}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TallyConnector.SourceGenerators", "src\SourceGenerators\TallyConnector.SourceGenerators\TallyConnector.SourceGenerators.csproj", "{7CB09A81-BD09-4280-82B1-F5D6BA1919E8}"
Expand All @@ -39,6 +37,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TC.Core.Tests", "src\Tests\
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CustomService", "Examples\CustomService\CustomService.csproj", "{70CCDA8E-6ABD-4717-98D9-FC108A9E59C0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TallyConnector.TDLReportSourceGenerator", "src\SourceGenerators\TallyConnector.TDLReportSourceGenerator\TallyConnector.TDLReportSourceGenerator.csproj", "{227F0B90-3C6C-4C37-BF71-5D0CB61B5F48}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -87,14 +87,6 @@ Global
{3F74EEAD-A862-4A2B-95A3-0B9906FCEC32}.Release|Any CPU.Build.0 = Release|Any CPU
{3F74EEAD-A862-4A2B-95A3-0B9906FCEC32}.Release|x64.ActiveCfg = Release|Any CPU
{3F74EEAD-A862-4A2B-95A3-0B9906FCEC32}.Release|x64.Build.0 = Release|Any CPU
{54AB2077-322D-41AF-9E85-417BF774E72C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{54AB2077-322D-41AF-9E85-417BF774E72C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{54AB2077-322D-41AF-9E85-417BF774E72C}.Debug|x64.ActiveCfg = Debug|Any CPU
{54AB2077-322D-41AF-9E85-417BF774E72C}.Debug|x64.Build.0 = Debug|Any CPU
{54AB2077-322D-41AF-9E85-417BF774E72C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{54AB2077-322D-41AF-9E85-417BF774E72C}.Release|Any CPU.Build.0 = Release|Any CPU
{54AB2077-322D-41AF-9E85-417BF774E72C}.Release|x64.ActiveCfg = Release|Any CPU
{54AB2077-322D-41AF-9E85-417BF774E72C}.Release|x64.Build.0 = Release|Any CPU
{47FE5A4F-FA54-4761-8257-75FDD6615535}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{47FE5A4F-FA54-4761-8257-75FDD6615535}.Debug|Any CPU.Build.0 = Debug|Any CPU
{47FE5A4F-FA54-4761-8257-75FDD6615535}.Debug|x64.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -143,6 +135,14 @@ Global
{70CCDA8E-6ABD-4717-98D9-FC108A9E59C0}.Release|Any CPU.Build.0 = Release|Any CPU
{70CCDA8E-6ABD-4717-98D9-FC108A9E59C0}.Release|x64.ActiveCfg = Release|Any CPU
{70CCDA8E-6ABD-4717-98D9-FC108A9E59C0}.Release|x64.Build.0 = Release|Any CPU
{227F0B90-3C6C-4C37-BF71-5D0CB61B5F48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{227F0B90-3C6C-4C37-BF71-5D0CB61B5F48}.Debug|Any CPU.Build.0 = Debug|Any CPU
{227F0B90-3C6C-4C37-BF71-5D0CB61B5F48}.Debug|x64.ActiveCfg = Debug|Any CPU
{227F0B90-3C6C-4C37-BF71-5D0CB61B5F48}.Debug|x64.Build.0 = Debug|Any CPU
{227F0B90-3C6C-4C37-BF71-5D0CB61B5F48}.Release|Any CPU.ActiveCfg = Release|Any CPU
{227F0B90-3C6C-4C37-BF71-5D0CB61B5F48}.Release|Any CPU.Build.0 = Release|Any CPU
{227F0B90-3C6C-4C37-BF71-5D0CB61B5F48}.Release|x64.ActiveCfg = Release|Any CPU
{227F0B90-3C6C-4C37-BF71-5D0CB61B5F48}.Release|x64.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -153,7 +153,6 @@ Global
{F3F963A6-F6FE-473D-9117-6E803B63700B} = {7747874E-E8F5-4E48-8013-8166AEBE7374}
{2D8219A1-E4E2-4661-96E5-D9717FB5669E} = {7747874E-E8F5-4E48-8013-8166AEBE7374}
{3F74EEAD-A862-4A2B-95A3-0B9906FCEC32} = {16ED73AE-7555-49BB-A0BB-7057F4380592}
{54AB2077-322D-41AF-9E85-417BF774E72C} = {D1517754-F474-4D01-B5A5-560D79FA9819}
{47FE5A4F-FA54-4761-8257-75FDD6615535} = {67D1D28B-FF22-44C5-8DA8-7ED316213B40}
{7CB09A81-BD09-4280-82B1-F5D6BA1919E8} = {D1517754-F474-4D01-B5A5-560D79FA9819}
{2DECC8E3-EF9A-4695-B304-134601F847E7} = {67D1D28B-FF22-44C5-8DA8-7ED316213B40}
Expand All @@ -162,6 +161,7 @@ Global
{852867F4-1D6D-4121-A2D7-469C0C4BE48A} = {31B73BA3-48F9-4EDA-8C99-15CC77DE73E9}
{F70A1B56-ED0B-414C-8980-53D081CB4B90} = {67D1D28B-FF22-44C5-8DA8-7ED316213B40}
{70CCDA8E-6ABD-4717-98D9-FC108A9E59C0} = {16ED73AE-7555-49BB-A0BB-7057F4380592}
{227F0B90-3C6C-4C37-BF71-5D0CB61B5F48} = {D1517754-F474-4D01-B5A5-560D79FA9819}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {6D79E273-8DE3-4E5A-AF56-E082111F7BD0}
Expand Down
44 changes: 44 additions & 0 deletions TallyConnectorr_Nugget.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{93809C71-F001-49C8-9226-591B592AE0D9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TallyConnector", "src\TallyConnector\TallyConnector.csproj", "{8DEEE052-2FB3-4D35-8207-15ED87EF6127}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TallyConnector.Core", "src\TallyConnector.Core\TallyConnector.Core.csproj", "{01CB1D84-633F-4D7B-A9AB-03F0C7D47B29}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SourceGenerators", "SourceGenerators", "{FC6FB42C-5BF5-4226-AB94-D31A2759CB16}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TallyConnector.TDLReportSourceGenerator", "src\SourceGenerators\TallyConnector.TDLReportSourceGenerator\TallyConnector.TDLReportSourceGenerator.csproj", "{218197F7-EA08-431C-9BB6-21BBD2A0C3E5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{8DEEE052-2FB3-4D35-8207-15ED87EF6127}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8DEEE052-2FB3-4D35-8207-15ED87EF6127}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8DEEE052-2FB3-4D35-8207-15ED87EF6127}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8DEEE052-2FB3-4D35-8207-15ED87EF6127}.Release|Any CPU.Build.0 = Release|Any CPU
{01CB1D84-633F-4D7B-A9AB-03F0C7D47B29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{01CB1D84-633F-4D7B-A9AB-03F0C7D47B29}.Debug|Any CPU.Build.0 = Debug|Any CPU
{01CB1D84-633F-4D7B-A9AB-03F0C7D47B29}.Release|Any CPU.ActiveCfg = Release|Any CPU
{01CB1D84-633F-4D7B-A9AB-03F0C7D47B29}.Release|Any CPU.Build.0 = Release|Any CPU
{218197F7-EA08-431C-9BB6-21BBD2A0C3E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{218197F7-EA08-431C-9BB6-21BBD2A0C3E5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{218197F7-EA08-431C-9BB6-21BBD2A0C3E5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{218197F7-EA08-431C-9BB6-21BBD2A0C3E5}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{8DEEE052-2FB3-4D35-8207-15ED87EF6127} = {93809C71-F001-49C8-9226-591B592AE0D9}
{01CB1D84-633F-4D7B-A9AB-03F0C7D47B29} = {93809C71-F001-49C8-9226-591B592AE0D9}
{FC6FB42C-5BF5-4226-AB94-D31A2759CB16} = {93809C71-F001-49C8-9226-591B592AE0D9}
{218197F7-EA08-431C-9BB6-21BBD2A0C3E5} = {FC6FB42C-5BF5-4226-AB94-D31A2759CB16}
EndGlobalSection
EndGlobal
File renamed without changes.
File renamed without changes.
5 changes: 4 additions & 1 deletion src/TallyConnector/TallyConnector.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,19 @@
<ItemGroup Condition="'$(TargetFramework)' != 'net6.0'">
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
</ItemGroup>


<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.4" />
</ItemGroup>

<ItemGroup>



<ProjectReference Include="..\TallyConnector.Core\TallyConnector.Core.csproj" />
<ProjectReference Include="..\SourceGenerators\TallyConnector.SourceGenerators\TallyConnector.SourceGenerators.csproj" OutputItemType="Analyzer" />
<ProjectReference Include="..\SourceGenerators\TallyConnector.TDLReportSourceGenerator\TallyConnector.TDLReportSourceGenerator.csproj" OutputItemType="Analyzer" />
</ItemGroup>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\SourceGenerators\TC.TDLReportSourceGenerator\TC.TDLReportSourceGenerator.csproj" OutputItemType="Analyzer" />
<ProjectReference Include="..\..\..\..\TallyConnector.Core\TallyConnector.Core.csproj" />
<ProjectReference Include="..\..\..\..\TallyConnector\TallyConnector.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\SourceGenerators\TC.TDLReportSourceGenerator\TC.TDLReportSourceGenerator.csproj" />
<ProjectReference Include="..\..\..\..\TallyConnector.Core\TallyConnector.Core.csproj" />
<ProjectReference Include="..\..\..\..\TallyConnector\TallyConnector.csproj" />
</ItemGroup>
Expand Down

0 comments on commit 99fca8a

Please sign in to comment.