Skip to content

Commit

Permalink
Merge branch 'feature/public-nuget' into 'develop'
Browse files Browse the repository at this point in the history
Add metadata for NuGet publishing

See merge request shared/extensions/Nyris.Extensions.AspNetCore.CacheControl!3
  • Loading branch information
sunsided committed Aug 18, 2023
2 parents f5c8162 + 68fc3ab commit 0cd9e73
Show file tree
Hide file tree
Showing 8 changed files with 382 additions and 18 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net

name: .NET

on:
push:
branches: [ "main", "develop", "feature/*" ]
pull_request:
branches: [ "main", "develop" ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
57 changes: 40 additions & 17 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project>

<PropertyGroup>
<Company>Nyris GmbH</Company>
<PackageTags>Extensions;Cache-Control</PackageTags>
<PackageLicenseExpression>EUPL-1.2</PackageLicenseExpression>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageIcon>logo.png</PackageIcon>
<PublishRelease>true</PublishRelease>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<!-- See GitHub specific overrides below -->
<PackageProjectUrl>https://git.nyris.io/shared/extensions/Nyris.Extensions.AspNetCore.CacheControl</PackageProjectUrl>
</PropertyGroup>

<PropertyGroup>
<RepositoryUrl>https://git.nyris.io/shared/extensions/Nyris.Extensions.AspNetCore.CacheControl.git</RepositoryUrl>
<!-- See GitHub specific overrides below -->
<RepositoryUrl>$(PackageProjectUrl).git</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
</PropertyGroup>

<PropertyGroup>
Expand All @@ -22,27 +28,45 @@
<Nullable>enable</Nullable>
</PropertyGroup>

<PropertyGroup>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<!--
<NoWarn>$(NoWarn);...</NoWarn>
<WarningsNotAsErrors>$(WarningsNotAsErrors);...</WarningsNotAsErrors>
-->
</PropertyGroup>

<!-- CI/CD builds -->
<PropertyGroup Condition="'$(CI)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>

<!-- SourceLink -->
<!-- Internal builds (i.e., not on GitHub) -->
<ItemGroup Condition="'$(GITHUB_ACTIONS)' != 'true'">
<PackageReference Include="SourceLink.Embed.AllSourceFiles" Version="[2.8.3,3.0.0)" PrivateAssets="All" />
</ItemGroup>

<!-- GitHub -->
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<PackageProjectUrl>https://github.com/nyris/Nyris.Extensions.AspNetCore.CacheControl</PackageProjectUrl>
<RepositoryUrl>$(PackageProjectUrl).git</RepositoryUrl>
</PropertyGroup>
<ItemGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="[1.1.1,2.0.0)" PrivateAssets="All" />
<!-- <PackageReference Include="GitVersion.MsBuild" Version="[5.12.0,6.0.0)" PrivateAssets="All" /> -->
</ItemGroup>
<ItemGroup Condition="'$(GITHUB_ACTIONS)' != 'true'">
<PackageReference Include="SourceLink.Embed.AllSourceFiles" Version="2.8.3" PrivateAssets="All" />

<PropertyGroup>
<SolutionDir Condition="'$(SolutionDir)'==''">$(MSBuildThisFileDirectory)</SolutionDir>
</PropertyGroup>

<ItemGroup>
<None Include="$(SolutionDir)\README.md" Pack="true" Visible="false" PackagePath="" />
<None Include="$(SolutionDir)\LICENSE.md" Pack="true" Visible="false" PackagePath="" />
<None Include="$(SolutionDir)\TRADEMARKS.md" Pack="true" Visible="false" PackagePath="" />
<None Include="$(SolutionDir)\nuget\logo.png" Pack="true" Visible="false" PackagePath="" />
</ItemGroup>

<PropertyGroup>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<!--
<NoWarn>$(NoWarn);...</NoWarn>
<WarningsNotAsErrors>$(WarningsNotAsErrors);...</WarningsNotAsErrors>
-->
</PropertyGroup>

<!-- Code Analyzers, Linters, ... -->
<ItemGroup>
<PackageReference Include="SonarAnalyzer" Version="6.6.0.3969" PrivateAssets="All" />
Expand All @@ -51,5 +75,4 @@
<ItemGroup>
<InternalsVisibleTo Include="$(AssemblyName).Tests" />
</ItemGroup>

</Project>
Loading

0 comments on commit 0cd9e73

Please sign in to comment.