1
0

Migrated to Gitea
All checks were successful
Branch Build / build-test-deploy (push) Successful in 3m27s

This commit is contained in:
2026-03-13 18:49:46 +01:00
parent b5a6205e52
commit 0a511726a2
6 changed files with 145 additions and 11 deletions

View File

@@ -0,0 +1,59 @@
name: Branch Build
on:
push:
branches:
- '**'
env:
TZ: 'Europe/Berlin'
LANG: 'de'
CONFIGURATION: 'Debug'
GITEA_SERVER_URL: ${{ gitea.server_url }}
CI_COMMIT_TAG: ${{ gitea.ref_name }}
jobs:
build-test-deploy:
runs-on: ubuntu
defaults:
run:
shell: bash
steps:
- name: Setup dotnet
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.x
cache: false
- name: Checkout repository code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Restore tools
run: |
set -ex
dotnet tool restore -v q
dotnet tool install dotnet-reportgenerator-globaltool --tool-path /dotnet-tools
echo "CI_SERVER_HOST=${GITEA_SERVER_URL#https://}" >> "$GITEA_ENV"
- name: Build solution
run: |
set -ex
shopt -s globstar
mkdir /artifacts
dotnet build -c ${CONFIGURATION} --nologo --restore --force --no-cache
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

View File

@@ -0,0 +1,70 @@
name: Release Build
on:
push:
tags:
- 'v*'
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
defaults:
run:
shell: bash
steps:
- name: Setup dotnet
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.x
cache: false
- name: Checkout repository code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Restore tools
run: |
set -ex
dotnet tool restore -v q
dotnet tool install dotnet-reportgenerator-globaltool --tool-path /dotnet-tools
dotnet tool install docfx --tool-path /dotnet-tools
echo "CI_SERVER_HOST=${GITEA_SERVER_URL#https://}" >> "$GITEA_ENV"
- name: Build solution
run: |
set -ex
shopt -s globstar
mkdir /artifacts
dotnet build -c ${CONFIGURATION} --nologo --restore --force --no-cache
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.NUGET_APIKEY }}" -s "https://api.nuget.org/v3/index.json" --skip-duplicate /artifacts/*.nupkg
- name: Publish documentation
env:
DOCFX_SOURCE_REPOSITORY_URL: 'https://github.com/AM-WD/LinkMobility'
run: |
set -ex
/dotnet-tools/docfx metadata docs/docfx.json
/dotnet-tools/docfx build docs/docfx.json
tar -C "${{ gitea.workspace }}/docs/_site" -czf "/artifacts/docs.tar.gz" .
curl -sSL --no-progress-meter --user "${{ secrets.DOCS_DEPLOY_USER }}:${{ secrets.DOCS_DEPLOY_PASS }}" -F docs=linkmobility -F dump=@/artifacts/docs.tar.gz "${{ vars.DOCS_DEPLOY_URL }}"

View File

@@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
_No changes yet_
### Changed
- Migrated main repository from Gitlab to Gitea
## [v0.1.0] - 2025-12-03

View File

@@ -2,6 +2,7 @@
<PropertyGroup>
<LangVersion>14.0</LangVersion>
<NrtRevisionFormat>{semvertag:main}{!:-dev}</NrtRevisionFormat>
<NrtContinuousIntegrationBuild>$(ContinuousIntegrationBuild)</NrtContinuousIntegrationBuild>
<AppendTargetFrameworkToOutputPath>true</AppendTargetFrameworkToOutputPath>
<CopyRefAssembliesToPublishDirectory>false</CopyRefAssembliesToPublishDirectory>
@@ -16,20 +17,21 @@
<Copyright>© {copyright:2025-} AM.WD</Copyright>
</PropertyGroup>
<PropertyGroup Condition="'$(GITLAB_CI)' == 'true'">
<PropertyGroup Condition="'$(CI)' == 'true'">
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>
<ItemGroup Condition="'$(GITLAB_CI)' == 'true'">
<SourceLinkGitLabHost Include="$(CI_SERVER_HOST)" Version="$(CI_SERVER_VERSION)" />
<PackageReference Include="Microsoft.SourceLink.GitLab" Version="8.0.0">
<ItemGroup Condition="'$(CI)' == 'true'">
<SourceLinkGiteaHost Include="$(CI_SERVER_HOST)" />
<PackageReference Include="Microsoft.SourceLink.Gitea" Version="8.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</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>

View File

@@ -1,9 +1,12 @@
<Solution>
<Folder Name="/Solution Items/" />
<Folder Name="/Solution Items/build/">
<File Path=".gitlab-ci.yml" />
<File Path="Directory.Build.props" />
</Folder>
<Folder Name="/Solution Items/build/workflows/">
<File Path=".gitea/workflows/branch-build.yml" />
<File Path=".gitea/workflows/release-build.yml" />
</Folder>
<Folder Name="/Solution Items/config/">
<File Path=".editorconfig" />
<File Path=".gitignore" />

View File

@@ -10,10 +10,10 @@
<AssemblyName>amwd-linkmobility</AssemblyName>
<RootNamespace>AMWD.Net.Api.LinkMobility</RootNamespace>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<EmbedUntrackedSources>false</EmbedUntrackedSources>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageIcon>package-icon.png</PackageIcon>
<PackageProjectUrl>https://developer.linkmobility.eu/</PackageProjectUrl>
@@ -22,8 +22,6 @@
<Product>LINK Mobility REST API</Product>
<Description>Implementation of the LINK Mobility REST API using .NET</Description>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<ItemGroup>