All checks were successful
Branch Build / build-test-deploy (push) Successful in 3m1s
71 lines
2.2 KiB
YAML
71 lines
2.2 KiB
YAML
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 }}"
|