Skip to content

Commit

Permalink
Publish symbols (#159)
Browse files Browse the repository at this point in the history
* Simplify pipelines

* Move NSwag to correct folder

* Publish symbols

* GeneratePackageOnBuild

* Update .gitignore

* Don't include symbols for analyzer
  • Loading branch information
maxkoshevoi committed Oct 15, 2021
1 parent e1a7410 commit 84b0ef1
Show file tree
Hide file tree
Showing 12 changed files with 38 additions and 78 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/dotnetcore.yml
Expand Up @@ -6,11 +6,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.202
- uses: actions/checkout@v2
- name: Build with dotnet
run: dotnet build --configuration Release
- name: Run Tests
Expand Down
14 changes: 1 addition & 13 deletions .github/workflows/publish-analyzer.yml
Expand Up @@ -11,22 +11,10 @@ jobs:
name: list on nuget
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4

# Required for a specific dotnet version that doesn't come with ubuntu-latest / windows-latest
# Visit bit.ly/2synnZl to see the list of SDKs that are pre-installed with ubuntu-latest / windows-latest
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.202

# Publish
- uses: actions/checkout@v2
- name: publish on version change
uses: rohith/publish-nuget@v2
with:
PROJECT_FILE_PATH: src/Ardalis.ApiEndpoints.CodeAnalyzers/Ardalis.ApiEndpoints.CodeAnalyzers.csproj # Relative to repository root
# VERSION_FILE_PATH: Directory.Build.props # Filepath with version info, relative to repository root. Defaults to project file
VERSION_REGEX: <Version>(.*)<\/Version> # Regex pattern to extract version info in a capturing group
TAG_COMMIT: true # Flag to enable / disable git tagging
TAG_FORMAT: Analyzer_v* # Format of the git tag, [*] gets replaced with version
NUGET_KEY: ${{secrets.NUGET_API_KEY}} # nuget.org API key
18 changes: 3 additions & 15 deletions .github/workflows/publish-nswag.yml
Expand Up @@ -4,30 +4,18 @@ on:
push:
branches:
- main # Your default release branch
- v4 # vNext
paths:
- 'src/ApiEndpoints.NSwag/**'
jobs:
publish:
name: list on nuget
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4

# Required for a specific dotnet version that doesn't come with ubuntu-latest / windows-latest
# Visit bit.ly/2synnZl to see the list of SDKs that are pre-installed with ubuntu-latest / windows-latest
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.202

# Publish
- uses: actions/checkout@v2
- name: publish on version change
uses: rohith/publish-nuget@v2
with:
PROJECT_FILE_PATH: src/ApiEndpoints.NSwag/Ardalis.ApiEndpoints.NSwag.csproj # Relative to repository root
# VERSION_FILE_PATH: Directory.Build.props # Filepath with version info, relative to repository root. Defaults to project file
VERSION_REGEX: <Version>(.*)<\/Version> # Regex pattern to extract version info in a capturing group
TAG_COMMIT: true # Flag to enable / disable git tagging
PROJECT_FILE_PATH: src/Ardalis.ApiEndpoints.NSwag/Ardalis.ApiEndpoints.NSwag.csproj # Relative to repository root
TAG_FORMAT: NSwag_v* # Format of the git tag, [*] gets replaced with version
INCLUDE_SYMBOLS: true # Pushing symbols along with nuget package to the server
NUGET_KEY: ${{secrets.NUGET_API_KEY}} # nuget.org API key
15 changes: 2 additions & 13 deletions .github/workflows/publish.yml
Expand Up @@ -10,22 +10,11 @@ jobs:
name: list on nuget
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4

# Required for a specific dotnet version that doesn't come with ubuntu-latest / windows-latest
# Visit bit.ly/2synnZl to see the list of SDKs that are pre-installed with ubuntu-latest / windows-latest
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.202

# Publish
- uses: actions/checkout@v2
- name: publish on version change
uses: rohith/publish-nuget@v2
with:
PROJECT_FILE_PATH: src/Ardalis.ApiEndpoints/Ardalis.ApiEndpoints.csproj # Relative to repository root
# VERSION_FILE_PATH: Directory.Build.props # Filepath with version info, relative to repository root. Defaults to project file
VERSION_REGEX: <Version>(.*)<\/Version> # Regex pattern to extract version info in a capturing group
TAG_COMMIT: true # Flag to enable / disable git tagging
TAG_FORMAT: v* # Format of the git tag, [*] gets replaced with version
INCLUDE_SYMBOLS: true # Pushing symbols along with nuget package to the server
NUGET_KEY: ${{secrets.NUGET_API_KEY}} # nuget.org API key
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -350,3 +350,4 @@ MigrationBackup/
.ionide/
sample/SampleEndpointApp/database.sqlite
.vscode/settings.json
sample/SampleEndpointApp/SampleEndpointApp.xml
5 changes: 4 additions & 1 deletion Ardalis.ApiEndpoints.sln
Expand Up @@ -4,6 +4,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
VisualStudioVersion = 16.0.29709.97
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{CE4A1E99-D876-4D8F-B56E-9BF453456BAB}"
ProjectSection(SolutionItems) = preProject
src\Directory.Build.props = src\Directory.Build.props
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "sample", "sample", "{38434103-76E0-4820-B4AF-F5EA5D08A7BD}"
EndProject
Expand All @@ -30,7 +33,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CodeAnalyzers", "CodeAnalyz
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "OpenApi", "OpenApi", "{7BBDA78D-3207-479B-9D80-9CADD46C31F1}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ardalis.ApiEndpoints.NSwag", "src\ApiEndpoints.NSwag\Ardalis.ApiEndpoints.NSwag.csproj", "{B11A92CB-3AE3-495E-99A2-F06EE62DCDF6}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ardalis.ApiEndpoints.NSwag", "src\Ardalis.ApiEndpoints.NSwag\Ardalis.ApiEndpoints.NSwag.csproj", "{B11A92CB-3AE3-495E-99A2-F06EE62DCDF6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ardalis.ApiEndpoints.Swashbuckle", "src\Ardalis.ApiEndpoints.Swashbuckle\Ardalis.ApiEndpoints.Swashbuckle.csproj", "{0A625FF1-6E6E-445F-B40D-50AE6B5FFCA0}"
EndProject
Expand Down
Expand Up @@ -2,19 +2,15 @@

<PropertyGroup>
<IncludeBuildOutput>false</IncludeBuildOutput>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<IncludeSymbols>false</IncludeSymbols>
</PropertyGroup>

<PropertyGroup>
<PackageId>Ardalis.ApiEndpoints.CodeAnalyzers</PackageId>
<Version>4.0.0-pre1</Version>
<Authors>Steve Smith (@ardalis), Philip Pittle (@ppittle)</Authors>
<PackageIconUrl>https://user-images.githubusercontent.com/782127/33497760-facf6550-d69c-11e7-94e4-b3856da259a9.png</PackageIconUrl>
<Company>Ardalis.com</Company>
<PackageProjectUrl>https://github.com/ardalis/ApiEndpoints</PackageProjectUrl>
<Description>Code Analyzers supporting using Api Endpoints</Description>
<Summary>Code Analyzers increasing productivity of developers using the Api Endpoints framework.</Summary>
<RepositoryUrl>https://github.com/ardalis/ApiEndpoints</RepositoryUrl>
<NoPackageAnalysis>true</NoPackageAnalysis>
<PackageTags>api endpoints code analyzers roslyn aspnetcore</PackageTags>
<PackageReleaseNotes>Updating version to 4.x and including with main package.</PackageReleaseNotes>
Expand Down
@@ -1,20 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
</PropertyGroup>

<PropertyGroup>
<PackageId>Ardalis.ApiEndpoints.NSwag</PackageId>
<Version>4.0.0-pre1</Version>
<Authors>Steve Smith (@ardalis), Maksym Koshovyi</Authors>
<PackageIconUrl>https://user-images.githubusercontent.com/782127/33497760-facf6550-d69c-11e7-94e4-b3856da259a9.png</PackageIconUrl>
<Company>Ardalis.com</Company>
<PackageProjectUrl>https://github.com/ardalis/ApiEndpoints</PackageProjectUrl>
<Description>TODO</Description>
<Summary>TODO</Summary>
<RepositoryUrl>https://github.com/ardalis/ApiEndpoints</RepositoryUrl>
<NoPackageAnalysis>true</NoPackageAnalysis>
<PackageTags>api endpoints openapi nswag</PackageTags>
</PropertyGroup>

Expand Down
@@ -1,20 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
</PropertyGroup>

<PropertyGroup>
<PackageId>Ardalis.ApiEndpoints.Swashbuckle</PackageId>
<Version>4.0.0-pre1</Version>
<Authors>Steve Smith (@ardalis), Maksym Koshovyi</Authors>
<PackageIconUrl>https://user-images.githubusercontent.com/782127/33497760-facf6550-d69c-11e7-94e4-b3856da259a9.png</PackageIconUrl>
<Company>Ardalis.com</Company>
<PackageProjectUrl>https://github.com/ardalis/ApiEndpoints</PackageProjectUrl>
<Description>TODO</Description>
<Summary>TODO</Summary>
<RepositoryUrl>https://github.com/ardalis/ApiEndpoints</RepositoryUrl>
<NoPackageAnalysis>true</NoPackageAnalysis>
<PackageTags>api endpoints openapi swashbuckle</PackageTags>
</PropertyGroup>

Expand Down
8 changes: 0 additions & 8 deletions src/Ardalis.ApiEndpoints/Ardalis.ApiEndpoints.csproj
Expand Up @@ -7,21 +7,13 @@
<PropertyGroup>
<PackageId>Ardalis.ApiEndpoints</PackageId>
<Title>Ardalis.ApiEndpoints</Title>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<Authors>Steve Smith (@ardalis)</Authors>
<Company>Ardalis.com</Company>
<PackageProjectUrl>https://github.com/ardalis/ApiEndpoints</PackageProjectUrl>
<Description>An alternative to Controllers for ASP.NET Core API Endpoints.</Description>
<Summary>Controllers promote creating bloated classes that lack cohesion. This project provides a simpler alternative that follows SOLID principles. An alternative to Controllers for ASP.NET Core API Endpoints.</Summary>
<RepositoryUrl>https://github.com/ardalis/ApiEndpoints</RepositoryUrl>
<PackageTags>aspnet asp.net aspnetcore asp.net core api web api rest endpoint controller</PackageTags>
<PackageReleaseNotes>TODO</PackageReleaseNotes>
<Version>4.0.0-pre1</Version>
<AssemblyName>Ardalis.ApiEndpoints</AssemblyName>
<PackageIconUrl>https://user-images.githubusercontent.com/782127/33497760-facf6550-d69c-11e7-94e4-b3856da259a9.png</PackageIconUrl>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
</PropertyGroup>

Expand Down
25 changes: 25 additions & 0 deletions src/Directory.Build.props
@@ -0,0 +1,25 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />

<PropertyGroup>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Company>Ardalis.com</Company>
<PackageProjectUrl>https://github.com/ardalis/ApiEndpoints</PackageProjectUrl>
<RepositoryUrl>https://github.com/ardalis/ApiEndpoints</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageIconUrl>https://user-images.githubusercontent.com/782127/33497760-facf6550-d69c-11e7-94e4-b3856da259a9.png</PackageIconUrl>
</PropertyGroup>

<PropertyGroup>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
</ItemGroup>

</Project>

0 comments on commit 84b0ef1

Please sign in to comment.