From ec959f15002e8c4184a01aabe6d94c74a450e722 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Fri, 13 Mar 2026 18:49:46 +0100 Subject: [PATCH] Migrated to Gitea --- .gitea/workflows/branch-build.yml | 59 ++++++++++++ .gitea/workflows/release-build.yml | 70 +++++++++++++++ .gitlab-ci.yml | 130 --------------------------- CHANGELOG.md | 4 +- Directory.Build.props | 12 +-- LinkMobility.slnx | 5 +- src/LinkMobility/LinkMobility.csproj | 6 +- 7 files changed, 145 insertions(+), 141 deletions(-) create mode 100644 .gitea/workflows/branch-build.yml create mode 100644 .gitea/workflows/release-build.yml delete mode 100644 .gitlab-ci.yml diff --git a/.gitea/workflows/branch-build.yml b/.gitea/workflows/branch-build.yml new file mode 100644 index 0000000..e8518ab --- /dev/null +++ b/.gitea/workflows/branch-build.yml @@ -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 diff --git a/.gitea/workflows/release-build.yml b/.gitea/workflows/release-build.yml new file mode 100644 index 0000000..7c739eb --- /dev/null +++ b/.gitea/workflows/release-build.yml @@ -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 }}" diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 2d5e8a5..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,130 +0,0 @@ -image: mcr.microsoft.com/dotnet/sdk:10.0 - -variables: - TZ: "Europe/Berlin" - LANG: "de" - -stages: - - build - - test - - deploy - - - -build-debug: - stage: build - tags: - - docker - - lnx - - 64bit - rules: - - if: $CI_COMMIT_TAG == null - script: - - dotnet build -c Debug --nologo - - mkdir ./artifacts - - shopt -s globstar - - mv ./**/*.nupkg ./artifacts/ || true - - mv ./**/*.snupkg ./artifacts/ || true - artifacts: - paths: - - artifacts/*.nupkg - - artifacts/*.snupkg - expire_in: 1 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" - - cat /reports/Summary.txt - artifacts: - when: always - reports: - coverage_report: - coverage_format: cobertura - path: ./**/coverage.cobertura.xml - -deploy-debug: - 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 --skip-duplicate artifacts/*.nupkg || true - - - -build-release: - stage: build - tags: - - docker - - lnx - - 64bit - rules: - - if: $CI_COMMIT_TAG != null - script: - - dotnet build -c Release --nologo - - mkdir ./artifacts - - shopt -s globstar - - mv ./**/*.nupkg ./artifacts/ - - mv ./**/*.snupkg ./artifacts/ - artifacts: - paths: - - artifacts/*.nupkg - - artifacts/*.snupkg - expire_in: 7 days - -test-release: - stage: test - dependencies: - - build-release - tags: - - docker - - lnx - - 64bit - rules: - - if: $CI_COMMIT_TAG != null - 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 - - cat /reports/Summary.txt - artifacts: - when: always - reports: - coverage_report: - coverage_format: cobertura - path: ./**/coverage.cobertura.xml - -deploy-release: - stage: deploy - dependencies: - - build-release - - test-release - tags: - - docker - - lnx - - server - rules: - - if: $CI_COMMIT_TAG != null - script: - - dotnet nuget push -k $NUGET_APIKEY -s https://api.nuget.org/v3/index.json --skip-duplicate artifacts/*.nupkg - diff --git a/CHANGELOG.md b/CHANGELOG.md index ce2b6cb..74664a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/Directory.Build.props b/Directory.Build.props index 8968f55..8a7806e 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -2,6 +2,7 @@ 14.0 {semvertag:main}{!:-dev} + $(ContinuousIntegrationBuild) true false @@ -16,20 +17,21 @@ © {copyright:2025-} AM.WD - + + true true - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/LinkMobility.slnx b/LinkMobility.slnx index b11af64..cd84e65 100644 --- a/LinkMobility.slnx +++ b/LinkMobility.slnx @@ -1,9 +1,12 @@ - + + + + diff --git a/src/LinkMobility/LinkMobility.csproj b/src/LinkMobility/LinkMobility.csproj index d6563fd..ad59163 100644 --- a/src/LinkMobility/LinkMobility.csproj +++ b/src/LinkMobility/LinkMobility.csproj @@ -10,10 +10,10 @@ amwd-linkmobility AMWD.Net.Api.LinkMobility - true true snupkg - false + true + true package-icon.png https://developer.linkmobility.eu/ @@ -22,8 +22,6 @@ LINK Mobility REST API Implementation of the LINK Mobility REST API using .NET - - true