diff --git a/.editorconfig b/.editorconfig index 5426f75..108919f 100644 --- a/.editorconfig +++ b/.editorconfig @@ -143,6 +143,6 @@ csharp_space_between_method_declaration_parameter_list_parentheses = false csharp_space_between_parentheses = false csharp_space_between_square_brackets = false -[*.{xml,csproj,targets,props,json}] +[*.{xml,csproj,targets,props,json,yml}] indent_size = 2 indent_style = space diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 37ec665..2e23646 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,33 +6,110 @@ variables: LANG: "de" -debug-job: + +stages: + - build + - test + - deploy + + + +debug-build: + stage: build tags: - docker + - lnx except: - tags - # branch-coverage - #coverage: '/Total[^|]*\|[^|]*\|\s*([0-9.%]+)/' - # line-coverage - coverage: '/Total[^|]*\|\s*([0-9.%]+)/' script: - dotnet restore --no-cache --force - dotnet build -c Debug --nologo --no-restore --no-incremental - - dotnet test -c Debug --nologo --no-restore --no-build - - dotnet nuget push -k $BAGET_APIKEY -s https://nuget.am-wd.de/v3/index.json --skip-duplicate **/*.nupkg + - mkdir ./artifacts + - mv ./AMWD.Common/bin/Debug/*.nupkg ./artifacts/ + - mv ./AMWD.Common/bin/Debug/*.snupkg ./artifacts/ + - mv ./AMWD.Common.AspNetCore/bin/Debug/*.nupkg ./artifacts/ + - mv ./AMWD.Common.AspNetCore/bin/Debug/*.snupkg ./artifacts/ + - mv ./AMWD.Common.EntityFrameworkCore/bin/Debug/*.nupkg ./artifacts/ + - mv ./AMWD.Common.EntityFrameworkCore/bin/Debug/*.snupkg ./artifacts/ + - mv ./AMWD.Common.Moq/bin/Debug/*.nupkg ./artifacts/ + - mv ./AMWD.Common.Moq/bin/Debug/*.snupkg ./artifacts/ + artifacts: + paths: + - artifacts/*.nupkg + - artifacts/*.snupkg + expire_in: 7 days - -release-job: +debug-test: + stage: test + dependencies: + - debug-build tags: - docker - only: + - lnx + except: - tags # branch-coverage - #coverage: '/Total[^|]*\|[^|]*\|\s*([0-9.%]+)/' + coverage: '/Total[^|]*\|[^|]*\|\s*([0-9.%]+)/' + script: + - dotnet restore --no-cache --force + - dotnet test -c Debug --nologo --no-restore + + + + +release-build: + stage: build + tags: + - docker + - lnx + - amd64 + only: + - tags + script: + - dotnet restore --no-cache --force + - dotnet build -c Release --nologo --no-restore --no-incremental + - mkdir ./artifacts + - mv ./AMWD.Common/bin/Release/*.nupkg ./artifacts/ + - mv ./AMWD.Common/bin/Release/*.snupkg ./artifacts/ + - mv ./AMWD.Common.AspNetCore/bin/Release/*.nupkg ./artifacts/ + - mv ./AMWD.Common.AspNetCore/bin/Release/*.snupkg ./artifacts/ + - mv ./AMWD.Common.EntityFrameworkCore/bin/Release/*.nupkg ./artifacts/ + - mv ./AMWD.Common.EntityFrameworkCore/bin/Release/*.snupkg ./artifacts/ + - mv ./AMWD.Common.Moq/bin/Release/*.nupkg ./artifacts/ + - mv ./AMWD.Common.Moq/bin/Release/*.snupkg ./artifacts/ + artifacts: + paths: + - artifacts/*.nupkg + - artifacts/*.snupkg + expire_in: 1 day + +release-test: + stage: test + dependencies: + - release-build + tags: + - docker + - lnx + - amd64 + only: + - tags # line-coverage coverage: '/Total[^|]*\|\s*([0-9.%]+)/' script: - dotnet restore --no-cache --force - - dotnet build -c Release --nologo --no-restore --no-incremental - - dotnet test -c Release --nologo --no-restore --no-build - - dotnet nuget push -k $BAGET_APIKEY -s https://nuget.am-wd.de/v3/index.json --skip-duplicate **/*.nupkg + - dotnet test -c Release --nologo --no-restore + + +release-deploy: + stage: deploy + dependencies: + - release-build + - release-test + tags: + - docker + - lnx + - amd64 + only: + - tags + script: + - dotnet nuget push -k $BAGET_APIKEY -s https://nuget.am-wd.de/v3/index.json --skip-duplicate artifacts/*.nupkg diff --git a/Directory.Build.props b/Directory.Build.props index e32b6ca..e903063 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,6 +1,6 @@ - {semvertag:main}{!:-mod} + {semvertag:main}{!:-dev} true false