Skip to content

Commit

Permalink
Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
afonsoft committed Mar 28, 2024
1 parent 31d6224 commit afefa34
Show file tree
Hide file tree
Showing 6 changed files with 112 additions and 14 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/build-and-pack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,12 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
5.0.x
6.0.x
7.0.x
8.0.x
- name: Update to Nuget
run: nuget update -self
- name: Clear NuGet cache
run: dotnet nuget locals all --clear
- name: Build Release
run: dotnet build --configuration Release --verbosity normal
run: dotnet build QRCoder.Core.sln --configuration Release --verbosity normal

2 changes: 0 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
5.0.x
6.0.x
7.0.x
8.0.x
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/publish-nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,15 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
5.0.x
6.0.x
7.0.x
8.0.x
- name: Update to Nuget
run: nuget update -self
- name: Clear NuGet cache
run: dotnet nuget locals all --clear
- name: Build
run: dotnet build --configuration $BUILD_CONFIG --verbosity normal
run: dotnet build QRCoder.Core.sln --configuration $BUILD_CONFIG --verbosity normal
- name: Pack
run: dotnet pack --configuration $BUILD_CONFIG /p:ContinuousIntegrationBuild=true
run: dotnet pack QRCoder.Core.sln --configuration $BUILD_CONFIG /p:ContinuousIntegrationBuild=true
- name: Publish Nuget
run: dotnet nuget push **\*.nupkg --source 'https://api.nuget.org/v3/index.json' --api-key ${{secrets.NUGET_TOKEN}} --skip-duplicate
2 changes: 0 additions & 2 deletions .github/workflows/snyk-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
5.0.x
6.0.x
7.0.x
8.0.x
- name: Dotnet Restore
run: dotnet restore --ignore-failed-sources
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/sonnar-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
5.0.x
6.0.x
7.0.x
8.0.x
- name: Update to Nuget
run: nuget update -self
Expand All @@ -41,7 +39,7 @@ jobs:
- name: Prepare analysis on SonarQube
run: dotnet sonarscanner begin /o:"afonsoft" /k:"QrCode.Core" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.login=${{secrets.SONNAR_TOKEN}} /d:sonar.scm.provider=git /d:sonar.coverage.exclusions="**Test*.cs" /d:sonar.cs.vstest.reportsPaths=resultTest/*.trx /d:sonar.cs.opencover.reportsPaths=/coverage.opencover.xml
- name: Build
run: dotnet build --configuration Debug
run: dotnet build QRCoder.Core.sln --configuration Debug
- name: Run QrCodeCore.Tests
run: dotnet test QRCoder.Core.Tests/QRCoder.Core.Tests.csproj --collect:"Code Coverage" --logger "trx;LogFileName=QRCoder.Core.Tests.trx" --results-directory resultTest/ --no-build --no-restore --configuration debug -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=cobertura
- name: Run Code Analysis
Expand Down
108 changes: 108 additions & 0 deletions QRCoder.Core.Docs.shfbproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0"
DefaultTargets="Build"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Import the common properties to support NuGet restore -->
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props"
Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')"/>
<PropertyGroup>
<!-- A target framework version is required by Visual Studio. It can be any version with a targeting pack installed. -->
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<!-- The configuration and platform will be used to determine which assemblies to include from solution and
project documentation sources -->
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{1acb79c9-fe69-4873-91ac-85a2177986c2}</ProjectGuid>
<SHFBSchemaVersion>2017.9.26.0</SHFBSchemaVersion>
<!-- AssemblyName, Name, and RootNamespace are not used by SHFB but Visual Studio adds them anyway -->
<AssemblyName>QRCoder.Core</AssemblyName>
<RootNamespace>QRCoder.Core</RootNamespace>
<Name>QRCoder.Core</Name>
<!-- SHFB properties -->
<FrameworkVersion>.NET Core/.NET Standard/.NET 5.0+</FrameworkVersion>
<OutputPath>.\Docs\</OutputPath>
<HtmlHelpName>QRCoder.Core</HtmlHelpName>
<Language>en-US</Language>
<DocumentationSources>
<DocumentationSource sourceFile="QRCoder.Core.sln"/>
</DocumentationSources>
<HelpFileFormat>Markdown</HelpFileFormat>
<SyntaxFilters>C#, Managed C++, XAML Usage, ASP.NET</SyntaxFilters>
<PresentationStyle>Markdown</PresentationStyle>
<CleanIntermediates>True</CleanIntermediates>
<KeepLogFile>False</KeepLogFile>
<DisableCodeBlockComponent>False</DisableCodeBlockComponent>
<IndentHtml>False</IndentHtml>
<BuildAssemblerVerbosity>OnlyWarningsAndErrors</BuildAssemblerVerbosity>
<SaveComponentCacheCapacity>200</SaveComponentCacheCapacity>
<HtmlSdkLinkType>Msdn</HtmlSdkLinkType>
<BinaryTOC>True</BinaryTOC>
<IncludeFavorites>True</IncludeFavorites>
<WebsiteSdkLinkType>Msdn</WebsiteSdkLinkType>
<AppendMarkdownFileExtensionsToUrls>True</AppendMarkdownFileExtensionsToUrls>
<CatalogProductId>VS</CatalogProductId>
<CatalogVersion>100</CatalogVersion>
<VendorName>QRCoder.Core</VendorName>
<ProductTitle>QRCoder.Core</ProductTitle>
<TocOrder>-1</TocOrder>
<TocParentId>-1</TocParentId>
<TocParentVersion>100</TocParentVersion>
<TopicVersion>100</TopicVersion>
<MSHelpViewerSdkLinkType>Msdn</MSHelpViewerSdkLinkType>
<PlugInConfigurations>
<PlugInConfig id="Assembly Binding Redirection"
enabled="True">
<configuration useGAC="true">
<assemblyBinding/>
<ignoreIfUnresolved>
<assemblyIdentity name="BusinessObjects.Licensing.KeycodeDecoder"/>
<assemblyIdentity name="Microsoft.VisualStudio.TestTools.UITest.Playback"/>
</ignoreIfUnresolved>
</configuration>
</PlugInConfig>
</PlugInConfigurations>
<HelpTitle>QRCoder.Core Docs</HelpTitle>
<HelpFileVersion>1.0.0.0</HelpFileVersion>
<NamingMethod>MemberName</NamingMethod>
<ContentPlacement>AboveNamespaces</ContentPlacement>
<RootNamespaceContainer>True</RootNamespaceContainer>
<NamespaceGrouping>False</NamespaceGrouping>
<MaximumGroupParts>2</MaximumGroupParts>
<Preliminary>False</Preliminary>
<SdkLinkTarget>Blank</SdkLinkTarget>
</PropertyGroup>
<!-- There are no properties for these groups. AnyCPU needs to appear in order for Visual Studio to perform
the build. The others are optional common platform types that may appear. -->
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|Win32' ">
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|Win32' ">
</PropertyGroup>
<!-- Import the common build targets during NuGet restore because before the packages are being installed, $(SHFBROOT) is not set yet -->
<Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets"
Condition="'$(MSBuildRestoreSessionId)' != ''"/>
<!-- Import the SHFB build targets during build -->
<Import Project="$(SHFBROOT)\SandcastleHelpFileBuilder.targets"
Condition="'$(MSBuildRestoreSessionId)' == ''"/>
<!-- The pre-build and post-build event properties must appear *after* the targets file import in order to be
evaluated correctly. -->
<PropertyGroup>
<PreBuildEvent>
</PreBuildEvent>
<PostBuildEvent>
</PostBuildEvent>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
</PropertyGroup>
</Project>

0 comments on commit afefa34

Please sign in to comment.