Added gitlab automation information
This commit is contained in:
parent
d2206a00cb
commit
19df48ee5c
3 changed files with 77 additions and 0 deletions
40
.gitlab-ci.yml
Normal file
40
.gitlab-ci.yml
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
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
|
||||
22
GitVersion.yml
Normal file
22
GitVersion.yml
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
mode: ContinuousDelivery
|
||||
branches:
|
||||
main:
|
||||
regex: ^main$
|
||||
increment: Minor
|
||||
prevent-increment-of-merged-branch-version: true
|
||||
track-merge-target: false
|
||||
master:
|
||||
regex: ^master$
|
||||
increment: Minor
|
||||
prevent-increment-of-merged-branch-version: true
|
||||
track-merge-target: false
|
||||
feature:
|
||||
regex: ^(?:feat(?:ure)?|feature)[/\\-]
|
||||
increment: Minor
|
||||
source-branches: ["main", "master"]
|
||||
hotfix:
|
||||
regex: ^hotfix[/\\-]
|
||||
increment: Patch
|
||||
ignore:
|
||||
sha: []
|
||||
commit-message-incrementing: Enabled
|
||||
|
|
@ -4,10 +4,25 @@
|
|||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<!-- NuGet package metadata -->
|
||||
<PackageId>AIFotoONLUS.Core</PackageId>
|
||||
<Authors>Maddo</Authors>
|
||||
<Company>Maddo</Company>
|
||||
<Description>Core library for AIFotoONLUS image processing and recognition.</Description>
|
||||
<RepositoryUrl>https://gitlab.com/MaddoScientisto/aifotoonlus</RepositoryUrl>
|
||||
<!-- Use GitVersion MSBuild properties to set package version during CI/build -->
|
||||
<Version>$(GitVersion_NuGetVersionV2)</Version>
|
||||
<PackageReleaseNotes>See Git history for release notes.</PackageReleaseNotes>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<IncludeSymbols>false</IncludeSymbols>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="OpenCvSharp4" Version="4.13.0.20260214" />
|
||||
<PackageReference Include="OpenCvSharp4.runtime.win" Version="4.13.0.20260214" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="10.0.3" />
|
||||
<!-- GitVersion MSBuild integration for automatic semantic versioning -->
|
||||
<PackageReference Include="GitVersion.MsBuild" Version="5.13.0" PrivateAssets="all" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
</ItemGroup>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue