Skip to content
Merged
  •  
  •  
  •  
24 changes: 21 additions & 3 deletions .github/workflows/_publish-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,33 @@ jobs:
steps:
- name: Check out Git repository
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
dotnet-version: '10.0.x'

- name: Restore strong-name key from secret
run: |
echo "${{ secrets.MINDEE_SNK_B64 }}" | base64 -d > /tmp/Mindee.snk
chmod 600 /tmp/Mindee.snk

- name: Install dependencies
run: dotnet restore "src/Mindee"
- name: Build
run: dotnet build "src/Mindee" --configuration Release --no-restore

- name: Build (strong-name signed)
run: dotnet build "src/Mindee" --configuration Release --no-restore -p:MindeeStrongNameKeyFile=/tmp/Mindee.snk

- name: Pack
run: dotnet pack "src/Mindee" -c Release -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg --no-build --output nuget

- name: Publish NuGet packages to NuGet
run: dotnet nuget push nuget/*.nupkg --api-key ${{ secrets.NUGET_KEY }} --source "nuget.org" --skip-duplicate

- name: Verify strong-name (PublicKeyToken)
run: |
sudo apt-get update
sudo apt-get install -y mono-devel unzip
unzip -p nuget/*.nupkg lib/net48/Mindee.dll > /tmp/Mindee.dll
sn -T /tmp/Mindee.dll
sn -vf /tmp/Mindee.dll
4 changes: 2 additions & 2 deletions .github/workflows/_publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ concurrency:

jobs:
build:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
dotnet-version: '10.0.x'

- name: Build
run: dotnet build "src" --configuration Release
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/_static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
dotnet-version: '10.0.x'

- name: Install dotnet-format tool
run: dotnet tool install -g dotnet-format
Expand Down
86 changes: 86 additions & 0 deletions .github/workflows/_test-cli.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Test Command Line Interface

on:
workflow_call:
workflow_dispatch:

env:
Mindee__ApiKey: ${{ secrets.MINDEE_API_KEY_SE_TESTS }}
MindeeV2__ApiKey: ${{ secrets.MINDEE_V2_SE_TESTS_API_KEY }}
MINDEE_V2_SE_TESTS_FINDOC_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_FINDOC_MODEL_ID }}
MINDEE_V2_SE_TESTS_CLASSIFICATION_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_CLASSIFICATION_MODEL_ID }}
MINDEE_V2_SE_TESTS_CROP_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_CROP_MODEL_ID }}
MINDEE_V2_SE_TESTS_SPLIT_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_SPLIT_MODEL_ID }}
MINDEE_V2_SE_TESTS_OCR_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_OCR_MODEL_ID }}

jobs:
test:
name: Run CLI tests
timeout-minutes: 30
strategy:
max-parallel: 4
matrix:
os_config:
- os: "ubuntu-24.04"
rid: "linux-x64"
- os: "macos-latest"
rid: "osx-x64"
- os: "windows-latest"
rid: "win-x64"
dotnet:
- "net8.0"
- "net10.0"
include:
- os_config:
os: "windows-latest"
rid: "win-x64"
dotnet: "net472"
- os_config:
os: "windows-latest"
rid: "win-x64"
dotnet: "net48"
runs-on: ${{ matrix.os_config.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
10.0.x

- uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
restore-keys: |
${{ runner.os }}-nuget-

- name: Install dotnet-script
run: |
dotnet tool install -g dotnet-script

- name: Publish Locally (.NET Framework)
if: startsWith(matrix.dotnet, 'net4')
run: |
cd src/Mindee.Cli
dotnet publish -f ${{ matrix.dotnet }} -c Release -r ${{ matrix.os_config.rid }} -o ./bin/Release/${{ matrix.dotnet }}/${{ matrix.os_config.rid }}

- name: Publish Locally (.NET 6+)
if: ${{ !startsWith(matrix.dotnet, 'net4') }}
run: |
cd src/Mindee.Cli
dotnet publish -f ${{ matrix.dotnet }} -c Release -r ${{ matrix.os_config.rid }} --self-contained true -p:PublishSingleFile=true -o ./bin/Release/${{ matrix.dotnet }}/${{ matrix.os_config.rid }}

- name: Test V1 CLI
shell: sh
run: |
./tests/test_v1_cli.sh ./tests/resources/file_types/pdf/blank_1.pdf ${{ matrix.dotnet }} ${{ matrix.os_config.rid }}

- name: Test V2 CLI
shell: sh
run: |
./tests/test_v2_cli.sh ./tests/resources/file_types/pdf/blank_1.pdf ${{ matrix.dotnet }} ${{ matrix.os_config.rid }}
20 changes: 11 additions & 9 deletions .github/workflows/_test-integrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ env:
Workflow__ID: ${{ secrets.WORKFLOW_ID_SE_TESTS }}
MindeeV2__ApiKey: ${{ secrets.MINDEE_V2_SE_TESTS_API_KEY }}
MindeeV2__Findoc__Model__Id: ${{ secrets.MINDEE_V2_SE_TESTS_FINDOC_MODEL_ID }}
MindeeV2__Classification__Model__Id: ${{ secrets.MINDEE_V2_SE_TESTS_CLASSIFICATION_MODEL_ID }}
MindeeV2__Crop__Model__Id: ${{ secrets.MINDEE_V2_SE_TESTS_CROP_MODEL_ID }}
MindeeV2__Ocr__Model__Id: ${{ secrets.MINDEE_V2_SE_TESTS_OCR_MODEL_ID }}
MindeeV2__Split__Model__Id: ${{ secrets.MINDEE_V2_SE_TESTS_SPLIT_MODEL_ID }}
MindeeV2__Blank__Pdf__Url: ${{ secrets.MINDEE_V2_SE_TESTS_BLANK_PDF_URL }}
MindeeV2__Failure__Webhook__Id: ${{ secrets.MINDEE_V2_SE_TESTS_FAILURE_WEBHOOK_ID }}

Expand All @@ -17,15 +21,14 @@ jobs:
name: Integration Test on *NIX
timeout-minutes: 35
strategy:
max-parallel: 6
max-parallel: 4
matrix:
os:
- "ubuntu-22.04"
# needs looking into
# - "macos-14"
- "ubuntu-24.04"
- "macos-15"
dotnet-version:
- "net6.0"
- "net8.0"
- "net10.0"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand All @@ -36,7 +39,6 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
8.0.x
10.0.x

Expand All @@ -62,8 +64,9 @@ jobs:
os:
- "windows-2022"
dotnet-version:
- "net482"
- "net6.0"
- "net472"
- "net48"
- "net8.0"
- "net10.0"
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -75,7 +78,6 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
8.0.x
10.0.x

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ on:
workflow_call:
workflow_dispatch:

env:
MINDEE_API_KEY: ${{ secrets.MINDEE_API_KEY_SE_TESTS }}
MINDEE_V2_API_KEY: ${{ secrets.MINDEE_V2_SE_TESTS_API_KEY }}
MINDEE_V2_SE_TESTS_FINDOC_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_FINDOC_MODEL_ID }}
MINDEE_V2_SE_TESTS_CLASSIFICATION_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_CLASSIFICATION_MODEL_ID }}
MINDEE_V2_SE_TESTS_CROP_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_CROP_MODEL_ID }}
MINDEE_V2_SE_TESTS_SPLIT_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_SPLIT_MODEL_ID }}
MINDEE_V2_SE_TESTS_OCR_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_OCR_MODEL_ID }}
MINDEE_V2_SE_TESTS_FAILURE_WEBHOOK_ID: ${{ secrets.MINDEE_V2_SE_TESTS_FAILURE_WEBHOOK_ID }}

jobs:
test:
name: Run tests
Expand All @@ -12,10 +22,10 @@ jobs:
max-parallel: 3
matrix:
os:
- "ubuntu-22.04"
- "ubuntu-24.04"
dotnet:
- "net6.0"
- "net8.0"
- "net10.0"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand All @@ -26,7 +36,6 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
8.0.x
10.0.x

Expand All @@ -47,8 +56,8 @@ jobs:

- name: Test V2 sample code
run: |
./tests/test_v2_code_samples.sh ${{ secrets.MINDEE_V2_SE_TESTS_API_KEY }} ${{ secrets.MINDEE_V2_SE_TESTS_FINDOC_MODEL_ID }} ${{ secrets.MINDEE_V2_SE_TESTS_FAILURE_WEBHOOK_ID }}
./tests/test_v2_code_samples.sh

- name: Test V1 sample code
run: |
./tests/test_v1_code_samples.sh ${{ secrets.MINDEE_ACCOUNT_SE_TESTS }} ${{ secrets.MINDEE_ENDPOINT_SE_TESTS }} ${{ secrets.MINDEE_API_KEY_SE_TESTS }}
./tests/test_v1_code_samples.sh ${{ secrets.MINDEE_ACCOUNT_SE_TESTS }} ${{ secrets.MINDEE_ENDPOINT_SE_TESTS }}
5 changes: 2 additions & 3 deletions .github/workflows/_test-units.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
strategy:
matrix:
os:
- "ubuntu-22.04"
- "ubuntu-24.04"
# needs looking into
# - "macos-14"
- "macos-15"
dotnet:
- "net6.0"
- "net8.0"
Expand Down Expand Up @@ -65,7 +65,6 @@ jobs:
id: setup-step
with:
dotnet-version: |
6.0.x
8.0.x
10.0.x

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ jobs:
codeql:
uses: mindee/mindee-api-dotnet/.github/workflows/_codeql.yml@main
test_code_samples:
uses: mindee/mindee-api-dotnet/.github/workflows/_test-code-samples.yml@main
uses: mindee/mindee-api-dotnet/.github/workflows/_test-smoke.yml@main
secrets: inherit
10 changes: 7 additions & 3 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ jobs:
uses: ./.github/workflows/_test-integrations.yml
needs: test-units
secrets: inherit
test-code-samples:
uses: ./.github/workflows/_test-code-samples.yml
needs: test-integrations
test-smoke:
uses: ./.github/workflows/_test-smoke.yml
needs: test-units
secrets: inherit
test-cli:
uses: ./.github/workflows/_test-cli.yml
needs: test-units
secrets: inherit
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,36 @@
# Mindee .NET Client Library Changelog

## v4.0.0-beta1 - 2026-03-16
### Changes
* :sparkles: Add support for `Classification`, `Crop`, `OCR` and `Split` utilities.
* :sparkles: Add Strong Name support
* :sparkles: Add full CLI support for V1 & V2
* :arrow_up: add support for .NET 4.7.2/4.8
* :sparkles: Add ability to search for models through Client and CLI
* :recycle: Make proper classes & methods static and/or private
* :arrow_up: Mutualize and bump most dependencies
### Fixes
* :bug: Fix V1 CLI
* :recycle: Fix Logging using improper syntax
* :bug: Fix dependency injections not functioning properly for .NET versions 4.7.2 and 4.8
### ¡Breaking Changes!
* :boom: :recycle: Refactor V1
* :recycle: move V1-exclusive internals to dedicated V1 namespace
* :coffin: Remove support for deprecated products:
* `CustomV1`
* `Bill of Lading`
* `Business Card`
* `Delivery Notes`
* `Driver License`
* `FR Energy Bill`
* `Indian Passport`
* `Nutrition Facts`
* `Resume`
* `US Healthcare Card`
* `US Mail`
* :boom: :recycle: Refactor V2
* :recycle: move V2-exclusive internals to dedicated V2 namespace
* :recycle: rename `Inference` V2 product to `Extraction`

## v3.39.0 - 2026-03-02
### Changes
Expand Down
Loading
Loading