Add automatic nuget build to Connected.Services

Add automatic versioning to Connected.Services
features/nuget_autobuild
Matija Koželj 2 years ago
parent cc6f5461e5
commit b04db19170

@ -1,38 +1,64 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0</TargetFramework> <TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
</PropertyGroup> <GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Title>$(AssemblyName)</Title>
<Authors>Tom PIT ltd</Authors>
<Copyright>2022 Tom PIT ltd</Copyright>
<PackageProjectUrl>https://git.tompit.com/Connected/Info</PackageProjectUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageTags>connected;platform;</PackageTags>
<IncludeSymbols>True</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageOutputPath>$(OutputPath)</PackageOutputPath>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="System.Linq.Async" Version="6.0.1" /> <PackageReference Include="Connected.Caching" Version="1.0.*-*" />
</ItemGroup> <PackageReference Include="Connected.Data" Version="1.0.*-*" />
<PackageReference Include="Connected.Security" Version="1.0.*-*" />
<PackageReference Include="Connected.Entities" Version="1.0.*-*" />
<PackageReference Include="Connected.Notifications" Version="1.0.*-*" />
<PackageReference Include="Connected.Validation" Version="1.0.*-*" />
<PackageReference Include="System.Linq.Async" Version="6.0.*-*" />
<PackageReference Include="Nerdbank.GitVersioning"
Version="3.5.119"
PrivateAssets="all"
Condition="!Exists('packages.config')" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\Connected\src\Connected\Connected.csproj" /> <Compile Update="SR.Designer.cs">
<ProjectReference Include="..\Connected.Caching\Connected.Caching.csproj" /> <DesignTime>True</DesignTime>
<ProjectReference Include="..\Connected.Data\Connected.Data.csproj" /> <AutoGen>True</AutoGen>
<ProjectReference Include="..\Connected.Security\Connected.Security.csproj" /> <DependentUpon>SR.resx</DependentUpon>
<ProjectReference Include="..\Connected.Entities\Connected.Entities.csproj" /> </Compile>
<ProjectReference Include="..\Connected.Notifications\Connected.Notifications.csproj" /> </ItemGroup>
<ProjectReference Include="..\Connected.Validation\Connected.Validation.csproj" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Update="SR.Designer.cs"> <EmbeddedResource Update="SR.resx">
<DesignTime>True</DesignTime> <Generator>ResXFileCodeGenerator</Generator>
<AutoGen>True</AutoGen> <LastGenOutput>SR.Designer.cs</LastGenOutput>
<DependentUpon>SR.resx</DependentUpon> </EmbeddedResource>
</Compile> </ItemGroup>
</ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Update="SR.resx"> <None Include="..\..\LICENSE">
<Generator>ResXFileCodeGenerator</Generator> <Pack>True</Pack>
<LastGenOutput>SR.Designer.cs</LastGenOutput> <PackagePath>\</PackagePath>
</EmbeddedResource> </None>
</ItemGroup> <None Include="..\..\README.md">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
</ItemGroup>
<Target Name="CopyPackages" AfterTargets="Pack">
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
</Target>
</Project> </Project>

@ -0,0 +1,14 @@
{
"$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/main/src/NerdBank.GitVersioning/version.schema.json",
"version": "1.0-prerelease",
"semVer1NumericIdentifierPadding": 4,
"nugetPackageVersion": {
"semVer": 2, // optional. Set to either 1 or 2 to control how the NuGet package version string is generated. Default is 1.
"precision": "build" // optional. Use when you want to use a more or less precise package version than the default major.minor.build.
},
"cloudBuild": {
"buildNumber": {
"enabled": true
}
}
}
Loading…
Cancel
Save