perf: cache Gemini API URL in constructor #113
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: NuGet Publish | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| paths: | |
| - '**/*.cs' | |
| - '**/*.csproj' | |
| - '.github/workflows/nuget-publish.yml' | |
| release: | |
| types: [ published ] | |
| workflow_dispatch: | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET SDKs | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: | | |
| 8.0.x | |
| 9.0.x | |
| 10.0.x | |
| - name: Restore dependencies | |
| run: dotnet restore SWEN3.Paperless.RabbitMq.sln | |
| - name: Build solution | |
| run: dotnet build SWEN3.Paperless.RabbitMq.sln --configuration Release --no-restore | |
| - name: Run tests | |
| run: dotnet test SWEN3.Paperless.RabbitMq.sln --configuration Release --no-build | |
| - name: Pack NuGet package | |
| run: dotnet pack SWEN3.Paperless.RabbitMq/SWEN3.Paperless.RabbitMq.csproj --configuration Release --no-build --output ./nupkg -p:GeneratePackageOnBuild=false | |
| - name: NuGet login (OIDC → temp API key) | |
| id: login | |
| if: github.event_name == 'release' || github.event_name == 'workflow_dispatch' | |
| uses: NuGet/login@v1 | |
| with: | |
| user: ${{ secrets.NUGET_USER }} | |
| - name: Publish packages to NuGet.org (Trusted Publishing) | |
| if: github.event_name == 'release' || github.event_name == 'workflow_dispatch' | |
| run: | | |
| dotnet nuget push ./nupkg/*.nupkg \ | |
| --source https://api.nuget.org/v3/index.json \ | |
| --api-key "${{ steps.login.outputs.NUGET_API_KEY }}" \ | |
| --skip-duplicate |