File tree Expand file tree Collapse file tree 3 files changed +12
-0
lines changed
Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 4444
4545 - name : Publish packages to NuGet.org
4646 if : github.event_name == 'release' || github.event_name == 'workflow_dispatch'
47+ env :
48+ NUGET_AUTH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4749 run : |
50+ # Request OIDC token for NuGet Trusted Publishing
51+ OIDC_TOKEN=$(curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=api://AzureADTokenExchange" | jq -r '.value')
52+
53+ # Push package with OIDC token
4854 dotnet nuget push ./nupkg/*.nupkg \
4955 --source https://api.nuget.org/v3/index.json \
56+ --api-key "$OIDC_TOKEN" \
5057 --skip-duplicate
Original file line number Diff line number Diff line change @@ -19,6 +19,10 @@ public static class GenAIPublishingExtensions
1919 /// <param name="publisher">The RabbitMQ publisher instance.</param>
2020 /// <param name="command">The GenAI command to publish.</param>
2121 /// <returns>A task representing the asynchronous operation.</returns>
22+ /// <example>
23+ /// <code>var command = new GenAICommand(jobId, text);</code>
24+ /// <code>await publisher.PublishGenAICommandAsync(command);</code>
25+ /// </example>
2226 public static async Task PublishGenAICommandAsync < T > ( this IRabbitMqPublisher publisher , T command )
2327 where T : class =>
2428 await publisher . PublishAsync ( RabbitMqSchema . GenAICommandRouting , command ) . ConfigureAwait ( false ) ;
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ namespace SWEN3.Paperless.RabbitMq;
1212/// <summary>
1313/// <para>Use <see cref="PublishingExtensions.PublishOcrCommandAsync{T}" /> to publish OCR commands.</para>
1414/// <para>Use <see cref="PublishingExtensions.PublishOcrEventAsync{T}" /> to publish OCR events.</para>
15+ /// <para>Use <see cref="GenAIPublishingExtensions.PublishGenAICommandAsync{T}" /> to publish GenAI commands (e.g., summaries).</para>
1516/// <para>Use <see cref="GenAIPublishingExtensions.PublishGenAIEventAsync{T}" /> to publish GenAI events.</para>
1617/// <para>Use <see cref="IRabbitMqConsumerFactory.CreateConsumerAsync{T}" /> to create message consumers.</para>
1718/// <para>Use <see cref="PaperlessEndpointExtensions.MapOcrEventStream" /> to map OCR SSE endpoint.</para>
You can’t perform that action at this time.
0 commit comments