diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 18d2266..b4d6bad 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -23,7 +23,6 @@ jobs: with: fetch-depth: 0 # Get all history to allow automatic versioning using MinVer - # Install the .NET SDK indicated in the global.json file - name: Setup .NET uses: actions/setup-dotnet@v6 with: @@ -31,12 +30,10 @@ jobs: 8.x 9.x 10.x + 11.x - - name: Setup NuGet - uses: nuget/setup-nuget@v3 - - name: Restore NuGet packages - run: nuget restore OpenAC.Net.Devices.sln + run: dotnet restore OpenAC.Net.Devices.sln working-directory: src - name: Build solution diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml new file mode 100644 index 0000000..b762322 --- /dev/null +++ b/.github/workflows/pull-request.yml @@ -0,0 +1,49 @@ +name: Pull Request CI + +on: + pull_request: + +permissions: + contents: read + +defaults: + run: + working-directory: src + +jobs: + validate: + name: Build, Test and Pack + runs-on: windows-latest + steps: + - uses: actions/checkout@v7 + with: + persist-credentials: false + + - name: Setup .NET + uses: actions/setup-dotnet@v6 + with: + dotnet-version: | + 8.x + 9.x + 10.x + 11.x + + - name: Build solution + run: dotnet build OpenAC.Net.Devices.sln --configuration Release -p:GeneratePackageOnBuild=false + + - name: Run tests on .NET 9 + run: dotnet run --project OpenAC.Net.Devices.Tests/OpenAC.Net.Devices.Tests.csproj --configuration Release --framework net9.0 --no-build + + - name: Run tests on .NET 11 + run: dotnet run --project OpenAC.Net.Devices.Tests/OpenAC.Net.Devices.Tests.csproj --configuration Release --framework net11.0 --no-build + + - name: Pack NuGet package + run: dotnet pack OpenAC.Net.Devices/OpenAC.Net.Devices.csproj --configuration Release --no-build --output ../nuget + + - name: Upload NuGet package + uses: actions/upload-artifact@v7 + with: + name: nuget + if-no-files-found: error + retention-days: 7 + path: nuget/*.nupkg diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index a156380..d21c4b0 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -23,7 +23,6 @@ jobs: with: fetch-depth: 0 # Get all history to allow automatic versioning using MinVer - # Install the .NET SDK indicated in the global.json file - name: Setup .NET uses: actions/setup-dotnet@v6 with: @@ -31,12 +30,10 @@ jobs: 8.x 9.x 10.x + 11.x - - name: Setup NuGet - uses: nuget/setup-nuget@v3 - - name: Restore NuGet packages - run: nuget restore OpenAC.Net.Devices.sln + run: dotnet restore OpenAC.Net.Devices.sln working-directory: src - name: Build solution diff --git a/README.md b/README.md index 3d62461..5414846 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [![Discord](https://img.shields.io/badge/Chat%20on-Discord-purple.svg)](https://discord.com/invite/brdmJ7Yv6w) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) [![Target Frameworks](https://img.shields.io/badge/.NET%20Framework-4.6.2%20%7C%204.8-blue.svg)](https://dotnet.microsoft.com/) -[![Target Frameworks](https://img.shields.io/badge/.NET%20Core%20%2F%20Standard-netstandard2.0%20%7C%20net8.0%20%7C%20net9.0%20%7C%20net10.0-blue.svg)](https://dotnet.microsoft.com/) +[![Target Frameworks](https://img.shields.io/badge/.NET%20Core%20%2F%20Standard-netstandard2.0%20%7C%20net8.0%20%7C%20net9.0%20%7C%20net10.0%20%7C%20net11.0-blue.svg)](https://dotnet.microsoft.com/) Biblioteca .NET multiplataforma para abstração e comunicação com dispositivos de automação comercial (impressoras térmicas ESC/POS, balanças, leitores, etiquetadoras e periféricos em geral). @@ -33,7 +33,7 @@ Desenvolvida pelo time **OpenAC .Net**, a biblioteca fornece uma interface unifi - Escrita direta em arquivos ou dispositivos de bloco/caractere (`FileConfig`). - **Suporte a Blazor Server e WebAssembly (`OpenAC.Net.Devices.Blazor`)**: - WebSerial, WebUSB e Web Bluetooth (BLE/GATT) por interop assíncrono próprio, sem SpawnDev. - - .NET 8, 9 e 10, com seleção por gesto do usuário e verificação de suporte do navegador. + - .NET 8, 9, 10 e 11, com seleção por gesto do usuário e verificação de suporte do navegador. --- @@ -232,7 +232,7 @@ await fileDevice.WriteAsync([0x1B, 0x40]); A extensão `OpenAC.Net.Devices.Blazor` usa as APIs do navegador por meio de `Microsoft.JSInterop`, sem SpawnDev nem bibliotecas JavaScript externas. Os alvos -são **.NET 8, 9 e 10**, nos modos **Server / Interactive Server**, **WebAssembly / +são **.NET 8, 9, 10 e 11**, nos modos **Server / Interactive Server**, **WebAssembly / Interactive WebAssembly** e **Interactive Auto**. No `Program.cs`, registre o serviço: diff --git a/src/.idea/.idea.OpenAC.Net.Devices/.idea/workspace.xml b/src/.idea/.idea.OpenAC.Net.Devices/.idea/workspace.xml index 813dc73..f50d928 100644 --- a/src/.idea/.idea.OpenAC.Net.Devices/.idea/workspace.xml +++ b/src/.idea/.idea.OpenAC.Net.Devices/.idea/workspace.xml @@ -13,73 +13,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +