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/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