Migrated CI from gitlab to gitea
All checks were successful
Branch Build / build-test-deploy (push) Successful in 1m46s
All checks were successful
Branch Build / build-test-deploy (push) Successful in 1m46s
This commit is contained in:
62
.gitea/workflows/branch-build.yml
Normal file
62
.gitea/workflows/branch-build.yml
Normal file
@@ -0,0 +1,62 @@
|
||||
name: Branch Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '**'
|
||||
|
||||
env:
|
||||
TZ: 'Europe/Berlin'
|
||||
LANG: 'de'
|
||||
CONFIGURATION: 'Debug'
|
||||
GITEA_SERVER_URL: ${{ gitea.server_url }}
|
||||
|
||||
jobs:
|
||||
build-test-deploy:
|
||||
runs-on: ubuntu
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
steps:
|
||||
- name: Checkout repository code
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup dotnet
|
||||
uses: actions/setup-dotnet@v5
|
||||
with:
|
||||
dotnet-version: 10.x
|
||||
cache: false
|
||||
|
||||
- name: Restore dependencies
|
||||
run: |
|
||||
set -ex
|
||||
dotnet restore -v q
|
||||
echo "CI_SERVER_HOST=${GITEA_SERVER_URL#https://}" >> "$GITEA_ENV"
|
||||
|
||||
- name: Setup tools
|
||||
run: |
|
||||
set -ex
|
||||
dotnet tool install dotnet-reportgenerator-globaltool --tool-path /dotnet-tools
|
||||
|
||||
- name: Build solution
|
||||
run: |
|
||||
set -ex
|
||||
shopt -s globstar
|
||||
mkdir /artifacts
|
||||
dotnet build -c ${CONFIGURATION} --no-restore --nologo
|
||||
mv ./**/*.nupkg /artifacts/ || true
|
||||
mv ./**/*.snupkg /artifacts/ || true
|
||||
|
||||
- name: Test solution
|
||||
run: |
|
||||
set -ex
|
||||
dotnet test -c ${CONFIGURATION} --no-build --nologo /p:CoverletOutputFormat=Cobertura
|
||||
/dotnet-tools/reportgenerator "-reports:${{ gitea.workspace }}/**/coverage.cobertura.xml" "-targetdir:/reports" "-reportType:TextSummary"
|
||||
cat /reports/Summary.txt
|
||||
|
||||
- name: Publish packages
|
||||
run: |
|
||||
set -ex
|
||||
dotnet nuget push -k "${{ secrets.BAGET_APIKEY }}" -s https://nuget.home.am-wd.de/v3/index.json --skip-duplicate /artifacts/*.nupkg
|
||||
61
.gitea/workflows/release-build.yml
Normal file
61
.gitea/workflows/release-build.yml
Normal file
@@ -0,0 +1,61 @@
|
||||
name: Release Build
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '**'
|
||||
|
||||
env:
|
||||
TZ: 'Europe/Berlin'
|
||||
LANG: 'de'
|
||||
CONFIGURATION: 'Release'
|
||||
GITEA_SERVER_URL: ${{ gitea.server_url }}
|
||||
CI_COMMIT_TAG: ${{ gitea.ref_name }}
|
||||
|
||||
jobs:
|
||||
build-test-deploy:
|
||||
runs-on: ubuntu
|
||||
steps:
|
||||
- name: Checkout repository code
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup dotnet
|
||||
uses: actions/setup-dotnet@v5
|
||||
with:
|
||||
dotnet-version: 10.x
|
||||
cache: false
|
||||
|
||||
- name: Restore dependencies
|
||||
run: |
|
||||
set -ex
|
||||
dotnet restore -v q
|
||||
echo "CI_SERVER_HOST=${GITEA_SERVER_URL#https://}" >> "$GITEA_ENV"
|
||||
|
||||
- name: Setup tools
|
||||
run: |
|
||||
set -ex
|
||||
dotnet tool install dotnet-reportgenerator-globaltool --tool-path /dotnet-tools
|
||||
dotnet tool install docfx --tool-path /dotnet-tools
|
||||
|
||||
- name: Build solution
|
||||
run: |
|
||||
set -ex
|
||||
shopt -s globstar
|
||||
mkdir /artifacts
|
||||
dotnet build -c ${CONFIGURATION} --no-restore --nologo
|
||||
mv ./**/*.nupkg /artifacts/ || true
|
||||
mv ./**/*.snupkg /artifacts/ || true
|
||||
|
||||
- name: Test solution
|
||||
run: |
|
||||
set -ex
|
||||
dotnet test -c ${CONFIGURATION} --no-build --nologo /p:CoverletOutputFormat=Cobertura
|
||||
/dotnet-tools/reportgenerator "-reports:${{ gitea.workspace }}/**/coverage.cobertura.xml" "-targetdir:/reports" "-reportType:TextSummary"
|
||||
cat /reports/Summary.txt
|
||||
|
||||
- name: Publish packages
|
||||
run: |
|
||||
set -ex
|
||||
dotnet nuget push -k "${{ secrets.BAGET_APIKEY }}" -s https://nuget.am-wd.de/v3/index.json --skip-duplicate /artifacts/*.nupkg
|
||||
189
.gitlab-ci.yml
189
.gitlab-ci.yml
@@ -1,189 +0,0 @@
|
||||
# The image should use the same version as the UnitTests are
|
||||
image: mcr.microsoft.com/dotnet/sdk:10.0
|
||||
|
||||
variables:
|
||||
TZ: Europe/Berlin
|
||||
LANG: de
|
||||
GIT_DEPTH: 0
|
||||
|
||||
stages:
|
||||
- build
|
||||
- test
|
||||
- deploy
|
||||
|
||||
|
||||
|
||||
build-debug:
|
||||
stage: build
|
||||
tags:
|
||||
- docker
|
||||
- lnx
|
||||
- 64bit
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG == null
|
||||
script:
|
||||
- shopt -s globstar
|
||||
- mkdir ./artifacts
|
||||
- dotnet build -c Debug --nologo
|
||||
- mv ./**/*.nupkg ./artifacts/
|
||||
- mv ./**/*.snupkg ./artifacts/
|
||||
artifacts:
|
||||
paths:
|
||||
- artifacts/*.nupkg
|
||||
- artifacts/*.snupkg
|
||||
expire_in: 7 days
|
||||
|
||||
test-debug:
|
||||
stage: test
|
||||
dependencies:
|
||||
- build-debug
|
||||
tags:
|
||||
- docker
|
||||
- lnx
|
||||
- 64bit
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG == null
|
||||
coverage: /Branch coverage[\s\S].+%/
|
||||
before_script:
|
||||
- dotnet tool install dotnet-reportgenerator-globaltool --tool-path /dotnet-tools
|
||||
script:
|
||||
- dotnet test -c Debug --nologo /p:CoverletOutputFormat=Cobertura
|
||||
- /dotnet-tools/reportgenerator "-reports:${CI_PROJECT_DIR}/**/coverage.cobertura.xml" "-targetdir:/reports" "-reportType:TextSummary"
|
||||
after_script:
|
||||
- cat /reports/Summary.txt
|
||||
artifacts:
|
||||
when: always
|
||||
reports:
|
||||
coverage_report:
|
||||
coverage_format: cobertura
|
||||
path: ./**/coverage.cobertura.xml
|
||||
|
||||
test-deploy:
|
||||
stage: deploy
|
||||
dependencies:
|
||||
- build-debug
|
||||
- test-debug
|
||||
tags:
|
||||
- docker
|
||||
- lnx
|
||||
- server
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG == null
|
||||
script:
|
||||
- dotnet nuget push -k $BAGET_APIKEY -s https://nuget.home.am-wd.de/v3/index.json artifacts/*.nupkg
|
||||
|
||||
|
||||
build-release:
|
||||
stage: build
|
||||
tags:
|
||||
- docker
|
||||
- lnx
|
||||
- 64bit
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG != null
|
||||
script:
|
||||
- shopt -s globstar
|
||||
- mkdir ./artifacts
|
||||
- dotnet build -c Release --nologo
|
||||
- mv ./**/*.nupkg ./artifacts/
|
||||
- mv ./**/*.snupkg ./artifacts/
|
||||
artifacts:
|
||||
paths:
|
||||
- artifacts/*.nupkg
|
||||
- artifacts/*.snupkg
|
||||
expire_in: 1 days
|
||||
|
||||
test-release:
|
||||
stage: test
|
||||
dependencies:
|
||||
- build-release
|
||||
tags:
|
||||
- docker
|
||||
- lnx
|
||||
- 64bit
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG != null
|
||||
coverage: /Branch coverage[\s\S].+%/
|
||||
before_script:
|
||||
- dotnet tool install dotnet-reportgenerator-globaltool --tool-path /dotnet-tools
|
||||
script:
|
||||
- dotnet test -c Release --nologo /p:CoverletOutputFormat=Cobertura
|
||||
- /dotnet-tools/reportgenerator "-reports:${CI_PROJECT_DIR}/**/coverage.cobertura.xml" "-targetdir:/reports" "-reportType:TextSummary"
|
||||
after_script:
|
||||
- cat /reports/Summary.txt
|
||||
artifacts:
|
||||
when: always
|
||||
reports:
|
||||
coverage_report:
|
||||
coverage_format: cobertura
|
||||
path: ./**/coverage.cobertura.xml
|
||||
|
||||
deploy-common:
|
||||
stage: deploy
|
||||
dependencies:
|
||||
- build-release
|
||||
- test-release
|
||||
tags:
|
||||
- docker
|
||||
- lnx
|
||||
- server
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG =~ /^v[0-9.]+/
|
||||
script:
|
||||
- dotnet nuget push -k $BAGET_APIKEY -s https://nuget.am-wd.de/v3/index.json --skip-duplicate artifacts/AMWD.Common.[0-9]*.nupkg
|
||||
|
||||
deploy-aspnet:
|
||||
stage: deploy
|
||||
dependencies:
|
||||
- build-release
|
||||
- test-release
|
||||
tags:
|
||||
- docker
|
||||
- lnx
|
||||
- server
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG =~ /^asp\/v[0-9.]+/
|
||||
script:
|
||||
- dotnet nuget push -k $BAGET_APIKEY -s https://nuget.am-wd.de/v3/index.json --skip-duplicate artifacts/AMWD.Common.AspNetCore.*.nupkg
|
||||
|
||||
deploy-efcore:
|
||||
stage: deploy
|
||||
dependencies:
|
||||
- build-release
|
||||
- test-release
|
||||
tags:
|
||||
- docker
|
||||
- lnx
|
||||
- server
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG =~ /^efc\/v[0-9.]+/
|
||||
script:
|
||||
- dotnet nuget push -k $BAGET_APIKEY -s https://nuget.am-wd.de/v3/index.json --skip-duplicate artifacts/AMWD.Common.EntityFrameworkCore.*.nupkg
|
||||
|
||||
deploy-msgpack:
|
||||
stage: deploy
|
||||
dependencies:
|
||||
- build-release
|
||||
- test-release
|
||||
tags:
|
||||
- docker
|
||||
- lnx
|
||||
- server
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG =~ /^msgpack\/v[0-9.]+/
|
||||
script:
|
||||
- dotnet nuget push -k $BAGET_APIKEY -s https://nuget.am-wd.de/v3/index.json --skip-duplicate artifacts/AMWD.Common.MessagePack.*.nupkg
|
||||
|
||||
deploy-test:
|
||||
stage: deploy
|
||||
dependencies:
|
||||
- build-release
|
||||
- test-release
|
||||
tags:
|
||||
- docker
|
||||
- lnx
|
||||
- server
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG =~ /^test\/v[0-9.]+/
|
||||
script:
|
||||
- dotnet nuget push -k $BAGET_APIKEY -s https://nuget.am-wd.de/v3/index.json --skip-duplicate artifacts/AMWD.Common.Test.*.nupkg
|
||||
@@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
### Changed
|
||||
|
||||
- `UseDatabaseProvider()` throws `DatabaseProviderException` with more specific message content
|
||||
- Migrated repository from Gitlab to Gitea
|
||||
|
||||
|
||||
## v2.1.0, asp/v3.1.0, efc/v3.1.0, msgpack/v1.0.0, test/v2.2.0 - 2025-11-24
|
||||
|
||||
@@ -38,7 +38,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{86DE1B7C-3
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{7196DA2B-D858-4B25-BC23-865175CFCDEC}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
.gitlab-ci.yml = .gitlab-ci.yml
|
||||
directory.build.props = directory.build.props
|
||||
EndProjectSection
|
||||
EndProject
|
||||
@@ -52,6 +51,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "config", "config", "{93EC8B
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AMWD.Common.AspNetCore.Tests", "test\AMWD.Common.AspNetCore.Tests\AMWD.Common.AspNetCore.Tests.csproj", "{2CDA58C2-DE85-478D-9474-A937A20BECD1}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{2FCE653E-650C-445E-915D-09B48501A3C0}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
.gitea\workflows\branch-build.yml = .gitea\workflows\branch-build.yml
|
||||
.gitea\workflows\release-build.yml = .gitea\workflows\release-build.yml
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -101,6 +106,7 @@ Global
|
||||
{7196DA2B-D858-4B25-BC23-865175CFCDEC} = {AFBF83AE-FE7D-48C1-B7E7-31BF3E17C6FB}
|
||||
{93EC8B16-7DEF-4E39-B590-E804DEF7C607} = {AFBF83AE-FE7D-48C1-B7E7-31BF3E17C6FB}
|
||||
{2CDA58C2-DE85-478D-9474-A937A20BECD1} = {E5DF156A-6C8B-4004-BA4C-A8DDE6FD3ECD}
|
||||
{2FCE653E-650C-445E-915D-09B48501A3C0} = {7196DA2B-D858-4B25-BC23-865175CFCDEC}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {961E8DF8-DDF5-4D10-A510-CE409E9962AC}
|
||||
|
||||
@@ -10,7 +10,6 @@ To save time, they are all packed to NuGet packages.
|
||||
| AMWD.Common.EntityFrameworkCore |  |
|
||||
| AMWD.Common.MessagePack |  |
|
||||
| AMWD.Common.Test |  |
|
||||
| CI / CD |   |
|
||||
|
||||
## Documentation
|
||||
|
||||
|
||||
@@ -11,6 +11,11 @@
|
||||
<Product>AM.WD Common Library for ASP.NET Core</Product>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Only build package for tagged releases -->
|
||||
<PropertyGroup Condition="$([System.Text.RegularExpressions.Regex]::IsMatch('$(CI_COMMIT_TAG)', '^asp\/v[0-9.]+'))">
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<FrameworkReference Include="Microsoft.AspNetCore.App" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
|
||||
|
||||
@@ -11,6 +11,11 @@
|
||||
<Product>AM.WD Common Library for EntityFramework Core</Product>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Only build package for tagged releases -->
|
||||
<PropertyGroup Condition="$([System.Text.RegularExpressions.Regex]::IsMatch('$(CI_COMMIT_TAG)', '^efc\/v[0-9.]+'))">
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.0" />
|
||||
|
||||
@@ -11,6 +11,11 @@
|
||||
<Product>AM.WD Common Library for MessagePack</Product>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Only build package for tagged releases -->
|
||||
<PropertyGroup Condition="$([System.Text.RegularExpressions.Regex]::IsMatch('$(CI_COMMIT_TAG)', '^msgpack\/v[0-9.]+'))">
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MessagePack" Version="2.5.198" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -11,6 +11,11 @@
|
||||
<Product>AM.WD Common Library for Unit-Testing</Product>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Only build package for tagged releases -->
|
||||
<PropertyGroup Condition="$([System.Text.RegularExpressions.Regex]::IsMatch('$(CI_COMMIT_TAG)', '^test\/v[0-9.]+'))">
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Moq" Version="4.20.72" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="3.4.3" />
|
||||
|
||||
@@ -10,6 +10,11 @@
|
||||
<Product>AM.WD Common Library</Product>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Only build package for tagged releases -->
|
||||
<PropertyGroup Condition="$([System.Text.RegularExpressions.Regex]::IsMatch('$(CI_COMMIT_TAG)', '^v[0-9.]+'))">
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
|
||||
<PackageReference Include="Unclassified.DeepConvert" Version="1.4.1" />
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<NrtRevisionFormat>{semvertag:main}{!:-dev}</NrtRevisionFormat>
|
||||
<NrtContinuousIntegrationBuild>$(ContinuousIntegrationBuild)</NrtContinuousIntegrationBuild>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<IncludeSymbols>true</IncludeSymbols>
|
||||
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
|
||||
<EmbedUntrackedSources>false</EmbedUntrackedSources>
|
||||
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<RepositoryUrl>https://git.am-wd.de/am-wd/common.git</RepositoryUrl>
|
||||
<RepositoryUrl>https://gitea.am-wd.de/am-wd/common.git</RepositoryUrl>
|
||||
<PublishRepositoryUrl>true</PublishRepositoryUrl>
|
||||
|
||||
<PackageIcon>icon.png</PackageIcon>
|
||||
@@ -28,17 +27,23 @@
|
||||
<None Include="../../README.md" Pack="true" PackagePath="/" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Only build package for Debug -->
|
||||
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(CI)' == 'true'">
|
||||
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
|
||||
<EmbedUntrackedSources>true</EmbedUntrackedSources>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(CI)' == 'true'">
|
||||
<SourceLinkGitLabHost Include="$(CI_SERVER_HOST)" Version="$(CI_SERVER_VERSION)" />
|
||||
<PackageReference Include="Microsoft.SourceLink.GitLab" Version="8.0.0" PrivateAssets="all" />
|
||||
<SourceLinkGiteaHost Include="$(CI_SERVER_HOST)" />
|
||||
<PackageReference Include="Microsoft.SourceLink.Gitea" Version="8.0.0" PrivateAssets="all" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AMWD.NetRevisionTask" Version="1.3.0">
|
||||
<PackageReference Include="AMWD.NetRevisionTask" Version="1.4.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
|
||||
Reference in New Issue
Block a user