-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
242 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# EditorConfig: https://EditorConfig.org | ||
|
||
root = true | ||
|
||
# All Files | ||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 4 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
# XML Configuration Files | ||
[*.{xml,config,props,targets,nuspec,resx,ruleset,vsixmanifest,vsct,refactorlog,runsettings}] | ||
indent_size = 2 | ||
|
||
# JSON Files | ||
[*.{json,json5,webmanifest}] | ||
indent_size = 2 | ||
|
||
# Project Files | ||
[*.{csproj,sqlproj}] | ||
indent_size = 2 | ||
|
||
# YAML Files | ||
[*.{yml,yaml}] | ||
indent_size = 2 | ||
|
||
# Markdown Files | ||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
# Web Files | ||
[*.{htm,html,js,jsm,ts,tsx,css,sass,scss,less,pcss,svg,vue}] | ||
indent_size = 2 | ||
|
||
# Batch Files | ||
[*.{cmd,bat}] | ||
end_of_line = crlf | ||
|
||
# Bash Files | ||
[*.sh] | ||
end_of_line = lf | ||
|
||
[*.{cs,vb}] | ||
dotnet_sort_system_directives_first = true | ||
dotnet_separate_import_directive_groups = true | ||
dotnet_style_namespace_match_folder = true | ||
|
||
[*.cs] | ||
csharp_using_directive_placement = outside_namespace | ||
csharp_style_namespace_declarations = file_scoped:warning |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
name: Build | ||
|
||
env: | ||
DOTNET_NOLOGO: true | ||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | ||
BUILD_PATH: '${{github.workspace}}/artifacts' | ||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
tags: | ||
- 'v*' | ||
pull_request: | ||
branches: | ||
- main | ||
- develop | ||
|
||
jobs: | ||
|
||
build: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install .NET Core | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: 7.0.x | ||
|
||
- name: Restore Dependencies | ||
run: dotnet restore | ||
|
||
- name: Build Solution | ||
run: dotnet build --no-restore --configuration Release | ||
|
||
- name: Start Cosmos DB | ||
shell: pwsh | ||
run: | | ||
Import-Module "$env:ProgramFiles\Azure Cosmos DB Emulator\PSModules\Microsoft.Azure.CosmosDB.Emulator" | ||
Start-CosmosDbEmulator | ||
- name: Run Test | ||
run: dotnet test --configuration Release --collect:"XPlat Code Coverage" --settings coverlet.runsettings | ||
|
||
- name: Generate Coverage | ||
uses: danielpalme/[email protected] | ||
with: | ||
reports: '${{github.workspace}}/test/*/TestResults/*/coverage.info' | ||
targetdir: ${{env.BUILD_PATH}} | ||
reporttypes: lcov | ||
|
||
- name: Report Coverage | ||
if: success() | ||
uses: coverallsapp/github-action@v2 | ||
with: | ||
file: artifacts/lcov.info | ||
format: lcov | ||
|
||
- name: Create Packages | ||
if: success() && github.event_name != 'pull_request' | ||
run: dotnet pack --configuration Release --include-symbols --include-source --no-build --no-restore --output "${{env.BUILD_PATH}}" | ||
|
||
- name: Upload Packages | ||
if: success() && github.event_name != 'pull_request' | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: packages | ||
path: '${{env.BUILD_PATH}}' | ||
|
||
deploy: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
if: success() && github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) | ||
|
||
steps: | ||
- name: Download Artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: packages | ||
|
||
- name: Publish Packages GitHub | ||
run: | | ||
for package in $(find -name "*.nupkg"); do | ||
echo "${0##*/}": Pushing $package... | ||
dotnet nuget push $package --source https://nuget.pkg.github.com/loresoft/index.json --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate | ||
done | ||
- name: Publish Packages feedz | ||
run: | | ||
for package in $(find -name "*.nupkg"); do | ||
echo "${0##*/}": Pushing $package... | ||
dotnet nuget push $package --source https://f.feedz.io/loresoft/open/nuget/index.json --api-key ${{ secrets.FEEDDZ_KEY }} --skip-duplicate | ||
done | ||
- name: Publish Packages Nuget | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
run: | | ||
for package in $(find -name "*.nupkg"); do | ||
echo "${0##*/}": Pushing $package... | ||
dotnet nuget push $package --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_KEY }} --skip-duplicate | ||
done | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
|
||
<PropertyGroup Label="Package"> | ||
<Description>Cosmos DB provider for ASP.NET Core Identity framework.</Description> | ||
<Copyright>Copyright © $([System.DateTime]::Now.ToString(yyyy)) LoreSoft</Copyright> | ||
<Authors>LoreSoft</Authors> | ||
<NeutralLanguage>en-US</NeutralLanguage> | ||
<GenerateDocumentationFile>true</GenerateDocumentationFile> | ||
<PackageTags>Cosmos;CosmosDB;Identity;Membership</PackageTags> | ||
<PackageProjectUrl>https://github.com/loresoft/Cosmos.Identity</PackageProjectUrl> | ||
<PackageLicenseExpression>MIT</PackageLicenseExpression> | ||
<PackageIcon>logo.png</PackageIcon> | ||
<PackageReadmeFile>README.md</PackageReadmeFile> | ||
<RepositoryType>git</RepositoryType> | ||
<RepositoryUrl>https://github.com/loresoft/Cosmos.Identity</RepositoryUrl> | ||
<PublishRepositoryUrl>true</PublishRepositoryUrl> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<DebugType>portable</DebugType> | ||
<PublishRepositoryUrl>true</PublishRepositoryUrl> | ||
<IncludeSymbols>true</IncludeSymbols> | ||
<SymbolPackageFormat>snupkg</SymbolPackageFormat> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<LangVersion>latest</LangVersion> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<NoWarn>1591</NoWarn> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<MinVerTagPrefix>v</MinVerTagPrefix> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" /> | ||
<PackageReference Include="MinVer" Version="4.3.0" PrivateAssets="All" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<None Include=".\..\..\logo.png"> | ||
<Pack>true</Pack> | ||
<PackagePath>\</PackagePath> | ||
<Visible>false</Visible> | ||
</None> | ||
<None Include=".\..\..\README.md"> | ||
<Pack>true</Pack> | ||
<PackagePath>\</PackagePath> | ||
<Visible>false</Visible> | ||
</None> | ||
</ItemGroup> | ||
|
||
</Project> |
Oops, something went wrong.