Update project metadata and add test data
- Changed the repository URL in the AIFotoONLUS.Core project file to point to the new Forgejo instance. - Removed the inclusion of the XML documentation file in the NuGet package. - Added a new CSV file containing test data for image processing, including filenames and associated text values.
This commit is contained in:
parent
dc4ebdaf42
commit
f672894c3e
3 changed files with 152 additions and 10 deletions
124
.forgejo/workflows/publish-aifotoonlus-core.yml
Normal file
124
.forgejo/workflows/publish-aifotoonlus-core.yml
Normal file
|
|
@ -0,0 +1,124 @@
|
|||
name: Build And Publish AIFotoONLUS.Core
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- develop
|
||||
tags:
|
||||
- '*'
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
DOTNET_VERSION: 10.0.x
|
||||
PROJECT_PATH: src/AIFotoONLUS.Core/AIFotoONLUS.Core.csproj
|
||||
PACKAGE_OUTPUT_DIR: artifacts/nuget
|
||||
PACKAGE_ARTIFACT_NAME: aifotoonlus-core-nuget
|
||||
NUGET_SOURCE_NAME: forgejo-aifotoonlus
|
||||
NUGET_SOURCE_URL: ${{ vars.AIFOTOONLUS_NUGET_SOURCE_URL || format('{0}/api/packages/{1}/nuget/index.json', github.server_url, vars.AIFOTOONLUS_PACKAGE_OWNER || github.repository_owner) }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: docker
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: ${{ env.DOTNET_VERSION }}
|
||||
|
||||
- name: Restore
|
||||
run: dotnet restore "${{ env.PROJECT_PATH }}"
|
||||
|
||||
- name: Build
|
||||
run: dotnet build "${{ env.PROJECT_PATH }}" --configuration Release --no-restore /p:GeneratePackageOnBuild=false
|
||||
|
||||
- name: Pack
|
||||
shell: bash
|
||||
run: |
|
||||
set -eu
|
||||
mkdir -p "${{ env.PACKAGE_OUTPUT_DIR }}"
|
||||
|
||||
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
|
||||
package_version="${GITHUB_REF_NAME#v}"
|
||||
echo "Packing tag version ${package_version}"
|
||||
dotnet pack "${{ env.PROJECT_PATH }}" \
|
||||
--configuration Release \
|
||||
--output "${{ env.PACKAGE_OUTPUT_DIR }}" \
|
||||
--no-build \
|
||||
/p:PackageVersion="${package_version}"
|
||||
else
|
||||
echo "Packing with project version or MinVer-derived version"
|
||||
dotnet pack "${{ env.PROJECT_PATH }}" \
|
||||
--configuration Release \
|
||||
--output "${{ env.PACKAGE_OUTPUT_DIR }}" \
|
||||
--no-build
|
||||
fi
|
||||
|
||||
- name: Upload package artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ env.PACKAGE_ARTIFACT_NAME }}
|
||||
path: ${{ env.PACKAGE_OUTPUT_DIR }}/*.nupkg
|
||||
if-no-files-found: error
|
||||
|
||||
publish:
|
||||
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
|
||||
needs: build
|
||||
runs-on: docker
|
||||
env:
|
||||
FORGEJO_PACKAGE_USERNAME: ${{ secrets.FORGEJO_PACKAGE_USERNAME }}
|
||||
FORGEJO_PACKAGE_TOKEN: ${{ secrets.FORGEJO_PACKAGE_TOKEN }}
|
||||
|
||||
steps:
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: ${{ env.DOTNET_VERSION }}
|
||||
|
||||
- name: Download package artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ${{ env.PACKAGE_ARTIFACT_NAME }}
|
||||
path: ${{ env.PACKAGE_OUTPUT_DIR }}
|
||||
|
||||
- name: Validate publish secrets
|
||||
shell: bash
|
||||
run: |
|
||||
set -eu
|
||||
if [ -z "${FORGEJO_PACKAGE_USERNAME}" ]; then
|
||||
echo "secrets.FORGEJO_PACKAGE_USERNAME is required"
|
||||
exit 1
|
||||
fi
|
||||
if [ -z "${FORGEJO_PACKAGE_TOKEN}" ]; then
|
||||
echo "secrets.FORGEJO_PACKAGE_TOKEN is required"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Configure Forgejo NuGet source
|
||||
run: |
|
||||
dotnet nuget add source "${{ env.NUGET_SOURCE_URL }}" \
|
||||
--name "${{ env.NUGET_SOURCE_NAME }}" \
|
||||
--username "${FORGEJO_PACKAGE_USERNAME}" \
|
||||
--password "${FORGEJO_PACKAGE_TOKEN}" \
|
||||
--store-password-in-clear-text
|
||||
|
||||
- name: Publish package to Forgejo NuGet
|
||||
shell: bash
|
||||
run: |
|
||||
set -eu
|
||||
shopt -s nullglob
|
||||
packages=("${{ env.PACKAGE_OUTPUT_DIR }}"/*.nupkg)
|
||||
if [ "${#packages[@]}" -eq 0 ]; then
|
||||
echo "No NuGet packages found in ${{ env.PACKAGE_OUTPUT_DIR }}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
dotnet nuget push "${{ env.PACKAGE_OUTPUT_DIR }}"/*.nupkg \
|
||||
--source "${{ env.NUGET_SOURCE_NAME }}" \
|
||||
--skip-duplicate
|
||||
27
gitversion.json
Normal file
27
gitversion.json
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"AssemblySemFileVer": "0.1.0.0",
|
||||
"AssemblySemVer": "0.1.0.0",
|
||||
"BranchName": "master",
|
||||
"BuildMetaData": null,
|
||||
"CommitDate": "2026-02-15",
|
||||
"CommitsSinceVersionSource": 11,
|
||||
"EscapedBranchName": "master",
|
||||
"FullBuildMetaData": "Branch.master.Sha.a90da31e531332a4cf0bafe604f89d0e14f3395a",
|
||||
"FullSemVer": "0.1.0-{BranchName}.11",
|
||||
"InformationalVersion": "0.1.0-{BranchName}.11+Branch.master.Sha.a90da31e531332a4cf0bafe604f89d0e14f3395a",
|
||||
"Major": 0,
|
||||
"MajorMinorPatch": "0.1.0",
|
||||
"Minor": 1,
|
||||
"Patch": 0,
|
||||
"PreReleaseLabel": "{BranchName}",
|
||||
"PreReleaseLabelWithDash": "-{BranchName}",
|
||||
"PreReleaseNumber": 11,
|
||||
"PreReleaseTag": "{BranchName}.11",
|
||||
"PreReleaseTagWithDash": "-{BranchName}.11",
|
||||
"SemVer": "0.1.0-{BranchName}.11",
|
||||
"Sha": "a90da31e531332a4cf0bafe604f89d0e14f3395a",
|
||||
"ShortSha": "a90da31",
|
||||
"UncommittedChanges": 7,
|
||||
"VersionSourceSha": "",
|
||||
"WeightedPreReleaseNumber": 11
|
||||
}
|
||||
|
|
@ -8,22 +8,13 @@
|
|||
<!-- Ensure the documentation file path is predictable so it can be packed -->
|
||||
<DocumentationFile>$(OutputPath)$(AssemblyName).xml</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
<!-- Include the generated XML documentation in the produced NuGet package
|
||||
next to the assembly under the lib/<tfm>/ folder. This guarantees the
|
||||
consumers installing the package will receive IntelliSense XML docs. -->
|
||||
<ItemGroup>
|
||||
<None Include="$(OutputPath)$(AssemblyName).xml">
|
||||
<Pack>true</Pack>
|
||||
<PackagePath>lib\$(TargetFramework)\</PackagePath>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<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>
|
||||
<RepositoryUrl>https://forgejo.maddoscientisto.net/maddo/AIFotoONLUS</RepositoryUrl>
|
||||
<!-- Versioning: use MinVer to infer semantic versions from Git tags. When no tag is present,
|
||||
projects will fall back to the default below. -->
|
||||
<Version>0.1.0</Version>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue