Skip to content
This repository was archived by the owner on Aug 30, 2025. It is now read-only.

Commit 305b398

Browse files
authored
Merge pull request #1 from TechNobre/develop
Deploy nuget version 1.0.0
2 parents 07c500c + 36adb0f commit 305b398

20 files changed

+1184
-0
lines changed

.editorconfig

Lines changed: 439 additions & 0 deletions
Large diffs are not rendered by default.

.github/dependabot.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
version: 2
2+
updates:
3+
4+
# Maintain dependencies for GitHub Actions
5+
- package-ecosystem: "github-actions"
6+
directory: "/" # Location of package manifests
7+
schedule:
8+
interval: "daily"
9+
assignees:
10+
- "NelsonBN"
11+
reviewers:
12+
- "NelsonBN"
13+
commit-message:
14+
prefix: "GitHubActions"
15+
include: "scope"
16+
target-branch: "develop"
17+
18+
# Nuget packages
19+
- package-ecosystem: "nuget"
20+
directory: "/" # Location of package manifests
21+
schedule:
22+
interval: "daily"
23+
assignees:
24+
- "NelsonBN"
25+
reviewers:
26+
- "NelsonBN"
27+
commit-message:
28+
prefix: "NuGet"
29+
include: "scope"
30+
target-branch: "develop"
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: 'Publish Nuget'
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
9+
jobs:
10+
11+
deploy-nuget:
12+
name: "Deploy NuGet"
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@main
17+
18+
- name: Setup .NET
19+
uses: actions/setup-dotnet@v2
20+
with:
21+
dotnet-version: '6.0.201'
22+
23+
- name: Restore dependencies
24+
run: dotnet restore
25+
26+
- name: Build
27+
run: dotnet build --configuration Release
28+
29+
- name: Create the Package
30+
run: dotnet pack --configuration Release
31+
32+
- name: Publish
33+
run: dotnet nuget push "./src/bin/PowerUtils.AspNetCore.ErrorHandler.ResponseTypes.*.nupkg" -k ${{ secrets.NUGET_TOKEN }} -s https://api.nuget.org/v3/index.json

.github/workflows/sonarcloud.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: 'SonarCloud'
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
types: [opened, reopened, synchronize]
9+
branches:
10+
- main
11+
12+
13+
jobs:
14+
15+
sonar-scanner:
16+
name: "Sonar scanner"
17+
runs-on: windows-latest
18+
steps:
19+
20+
- name: Setup .NET
21+
uses: actions/setup-dotnet@v2
22+
with:
23+
dotnet-version: '6.0.201'
24+
25+
- name: Set up JDK 11
26+
uses: actions/[email protected]
27+
with:
28+
distribution: 'adopt'
29+
java-version: '11'
30+
31+
- uses: actions/checkout@v2
32+
with:
33+
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
34+
35+
- name: Cache SonarCloud packages
36+
uses: actions/[email protected]
37+
with:
38+
path: ~\sonar\cache
39+
key: ${{ runner.os }}-sonar
40+
restore-keys: ${{ runner.os }}-sonar
41+
42+
- name: Cache SonarCloud scanner
43+
id: cache-sonar-scanner
44+
uses: actions/[email protected]
45+
with:
46+
path: .\.sonar\scanner
47+
key: ${{ runner.os }}-sonar-scanner
48+
restore-keys: ${{ runner.os }}-sonar-scanner
49+
50+
- name: Install SonarCloud scanner
51+
if: steps.cache-sonar-scanner.outputs.cache-hit != 'true'
52+
shell: pwsh
53+
run: |
54+
New-Item -Path .\.sonar\scanner -ItemType Directory
55+
dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner
56+
57+
- name: Build and analyze
58+
env:
59+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
60+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
61+
shell: pwsh
62+
run: |
63+
.\.sonar\scanner\dotnet-sonarscanner begin /k:"${{ secrets.SONAR_PROJECT_KEY }}" /o:"${{ secrets.SONAR_ORGANIZATION }}" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io"
64+
dotnet build --configuration Release
65+
dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
66+
.\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"

.github/workflows/test-project.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: 'Tests'
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
pull_request:
8+
types: [opened, reopened, synchronize]
9+
branches:
10+
- main
11+
12+
13+
jobs:
14+
15+
test-project:
16+
name: "Testing project"
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
22+
- name: Setup .NET
23+
uses: actions/setup-dotnet@v2
24+
with:
25+
dotnet-version: '6.0.201'
26+
27+
- name: Restore dependencies
28+
run: dotnet restore
29+
30+
- name: Build
31+
run: dotnet build --no-restore
32+
33+
- name: Test
34+
run: dotnet test --no-build

.gitignore

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ mono_crash.*
2323
[Rr]eleases/
2424
x64/
2525
x86/
26+
[Ww][Ii][Nn]32/
2627
[Aa][Rr][Mm]/
2728
[Aa][Rr][Mm]64/
2829
bld/
@@ -61,6 +62,12 @@ project.lock.json
6162
project.fragment.lock.json
6263
artifacts/
6364

65+
# Tye
66+
.tye/
67+
68+
# ASP.NET Scaffolding
69+
ScaffoldingReadMe.txt
70+
6471
# StyleCop
6572
StyleCopReport.xml
6673

@@ -137,6 +144,11 @@ _TeamCity*
137144
.axoCover/*
138145
!.axoCover/settings.json
139146

147+
# Coverlet is a free, cross platform Code Coverage Tool
148+
coverage*.json
149+
coverage*.xml
150+
coverage*.info
151+
140152
# Visual Studio code coverage results
141153
*.coverage
142154
*.coveragexml
@@ -348,3 +360,100 @@ MigrationBackup/
348360

349361
# Ionide (cross platform F# VS Code tools) working folder
350362
.ionide/
363+
364+
# Fody - auto-generated XML schema
365+
FodyWeavers.xsd
366+
367+
##
368+
## Visual studio for Mac
369+
##
370+
371+
372+
# globs
373+
Makefile.in
374+
*.userprefs
375+
*.usertasks
376+
config.make
377+
config.status
378+
aclocal.m4
379+
install-sh
380+
autom4te.cache/
381+
*.tar.gz
382+
tarballs/
383+
test-results/
384+
385+
# Mac bundle stuff
386+
*.dmg
387+
*.app
388+
389+
# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore
390+
# General
391+
.DS_Store
392+
.AppleDouble
393+
.LSOverride
394+
395+
# Icon must end with two \r
396+
Icon
397+
398+
399+
# Thumbnails
400+
._*
401+
402+
# Files that might appear in the root of a volume
403+
.DocumentRevisions-V100
404+
.fseventsd
405+
.Spotlight-V100
406+
.TemporaryItems
407+
.Trashes
408+
.VolumeIcon.icns
409+
.com.apple.timemachine.donotpresent
410+
411+
# Directories potentially created on remote AFP share
412+
.AppleDB
413+
.AppleDesktop
414+
Network Trash Folder
415+
Temporary Items
416+
.apdisk
417+
418+
# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore
419+
# Windows thumbnail cache files
420+
Thumbs.db
421+
ehthumbs.db
422+
ehthumbs_vista.db
423+
424+
# Dump file
425+
*.stackdump
426+
427+
# Folder config file
428+
[Dd]esktop.ini
429+
430+
# Recycle Bin used on file shares
431+
$RECYCLE.BIN/
432+
433+
# Windows Installer files
434+
*.cab
435+
*.msi
436+
*.msix
437+
*.msm
438+
*.msp
439+
440+
# Windows shortcuts
441+
*.lnk
442+
443+
# JetBrains Rider
444+
.idea/
445+
*.sln.iml
446+
447+
##
448+
## Visual Studio Code
449+
##
450+
.vscode
451+
.vscode/*
452+
!.vscode/settings.json
453+
!.vscode/tasks.json
454+
!.vscode/launch.json
455+
!.vscode/extensions.json
456+
457+
## Sonar
458+
.sonarqube
459+
sonarscan.bat

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Changelog
2+
3+
4+
5+
6+
## [1.0.0] - 2022-03-15
7+
8+
- Kickoff;
9+
- Moved the attributes from [PowerUtils.AspNetCore.WebAPI](https://github.com/TechNobre/PowerUtils.AspNetCore.WebAPI) project to this one so it can be used individually;
10+
11+
12+
### Breaking Changes
13+
14+
- namespace `PowerUtils.AspNetCore.WebAPI.Attributes.ResponseTypes` named to `PowerUtils.AspNetCore.Attributes.ResponseTypes`;
15+
- `Response400BadRequest` named to `Response400ProblemDetailsAttribute`;
16+
- `Response401Unauthorized` named to `Response401ProblemDetailsAttribute`;
17+
- `Response403Forbidden` named to `Response403ProblemDetailsAttribute`;
18+
- `Response404NotFound` named to `Response404ProblemDetailsAttribute`;
19+
- `Response409Conflict` named to `Response409ProblemDetailsAttribute`;
20+
- `Response415UnsupportedMediaType` named to `Response415ProblemDetailsAttribute`;
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.1.32210.238
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "1.project", "1.project", "{CE044FF1-BA3F-4229-B891-ABDB23817993}"
7+
ProjectSection(SolutionItems) = preProject
8+
.editorconfig = .editorconfig
9+
.gitignore = .gitignore
10+
CHANGELOG.md = CHANGELOG.md
11+
global.json = global.json
12+
LICENSE = LICENSE
13+
README.md = README.md
14+
EndProjectSection
15+
EndProject
16+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "2.cicd", "2.cicd", "{D0E7B389-76B5-40A7-8583-A9E72D2D48AB}"
17+
ProjectSection(SolutionItems) = preProject
18+
.github\dependabot.yml = .github\dependabot.yml
19+
.github\workflows\publish-nuget.yml = .github\workflows\publish-nuget.yml
20+
.github\workflows\sonarcloud.yml = .github\workflows\sonarcloud.yml
21+
.github\workflows\test-project.yml = .github\workflows\test-project.yml
22+
EndProjectSection
23+
EndProject
24+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "3.src", "3.src", "{6E23ADF0-4266-46A8-878B-8A41A15E8A67}"
25+
EndProject
26+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "4.tests", "4.tests", "{C32996E7-9E94-490F-9196-9D166379FA2A}"
27+
EndProject
28+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PowerUtils.AspNetCore.ErrorHandler.ResponseTypes", "src\PowerUtils.AspNetCore.ErrorHandler.ResponseTypes.csproj", "{976607B8-D23C-4691-A465-20EC9F5C3FAA}"
29+
EndProject
30+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PowerUtils.AspNetCore.ErrorHandler.ResponseTypes.Tests", "tests\PowerUtils.AspNetCore.ErrorHandler.ResponseTypes.Tests\PowerUtils.AspNetCore.ErrorHandler.ResponseTypes.Tests.csproj", "{CB1C4C48-F971-43AA-A154-287333EF6712}"
31+
EndProject
32+
Global
33+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
34+
Debug|Any CPU = Debug|Any CPU
35+
Release|Any CPU = Release|Any CPU
36+
EndGlobalSection
37+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
38+
{976607B8-D23C-4691-A465-20EC9F5C3FAA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
39+
{976607B8-D23C-4691-A465-20EC9F5C3FAA}.Debug|Any CPU.Build.0 = Debug|Any CPU
40+
{976607B8-D23C-4691-A465-20EC9F5C3FAA}.Release|Any CPU.ActiveCfg = Release|Any CPU
41+
{976607B8-D23C-4691-A465-20EC9F5C3FAA}.Release|Any CPU.Build.0 = Release|Any CPU
42+
{CB1C4C48-F971-43AA-A154-287333EF6712}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
43+
{CB1C4C48-F971-43AA-A154-287333EF6712}.Debug|Any CPU.Build.0 = Debug|Any CPU
44+
{CB1C4C48-F971-43AA-A154-287333EF6712}.Release|Any CPU.ActiveCfg = Release|Any CPU
45+
{CB1C4C48-F971-43AA-A154-287333EF6712}.Release|Any CPU.Build.0 = Release|Any CPU
46+
EndGlobalSection
47+
GlobalSection(SolutionProperties) = preSolution
48+
HideSolutionNode = FALSE
49+
EndGlobalSection
50+
GlobalSection(NestedProjects) = preSolution
51+
{976607B8-D23C-4691-A465-20EC9F5C3FAA} = {6E23ADF0-4266-46A8-878B-8A41A15E8A67}
52+
{CB1C4C48-F971-43AA-A154-287333EF6712} = {C32996E7-9E94-490F-9196-9D166379FA2A}
53+
EndGlobalSection
54+
GlobalSection(ExtensibilityGlobals) = postSolution
55+
SolutionGuid = {DB225477-AC3D-47A9-8F0D-A52866D30541}
56+
EndGlobalSection
57+
EndGlobal

0 commit comments

Comments
 (0)