40 lines
1 KiB
YAML
40 lines
1 KiB
YAML
stages:
|
|
- build
|
|
- publish
|
|
|
|
variables:
|
|
DOTNET_CLI_TELEMETRY_OPTOUT: "1"
|
|
DOTNET_NOLOGO: "true"
|
|
|
|
image: mcr.microsoft.com/dotnet/sdk:8.0
|
|
|
|
before_script:
|
|
- dotnet --info
|
|
|
|
build:
|
|
stage: build
|
|
script:
|
|
- dotnet restore
|
|
- dotnet build --configuration Release --no-restore
|
|
artifacts:
|
|
paths:
|
|
- src/AIFotoONLUS.Core/bin/**
|
|
expire_in: 1 hour
|
|
|
|
publish_nuget:
|
|
stage: publish
|
|
image: mcr.microsoft.com/dotnet/sdk:8.0
|
|
variables:
|
|
NUGET_SOURCE: "$CI_API_V4_URL/projects/$CI_PROJECT_ID/packages/nuget/index.json"
|
|
script:
|
|
- dotnet restore
|
|
- dotnet tool install --global GitVersion.Tool --version 5.13.0 || true
|
|
- export PATH="$PATH:~/.dotnet/tools"
|
|
- gitversion /output buildserver
|
|
- echo "GitVersion_NuGetVersionV2=$GitVersion_NuGetVersionV2"
|
|
- dotnet pack src/AIFotoONLUS.Core/AIFotoONLUS.Core.csproj -c Release -o nuget --no-build
|
|
- dotnet nuget push "nuget/*.nupkg" --source "$NUGET_SOURCE" --api-key "$CI_JOB_TOKEN" --skip-duplicate
|
|
only:
|
|
- main
|
|
- master
|
|
- tags
|