-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from pieces-app/feat/ai-extensions-support
Add support for Microsoft.Extensions.AI
- Loading branch information
Showing
24 changed files
with
1,733 additions
and
228 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,31 +3,39 @@ name: Release | |
on: | ||
push: | ||
tags: | ||
- '*' | ||
- 'client-*' | ||
|
||
jobs: | ||
publish-to-nuget: | ||
publish-client-to-nuget: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
# Set up .NET 8 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: 8.0.* | ||
- name: Build | ||
|
||
# Build the main client nuget package | ||
- name: Build Client | ||
working-directory: ./src/Client | ||
run: dotnet build -c Release -p:Version=${GITHUB_REF#refs/tags/v} | ||
run: dotnet build -c Release -p:Version=${GITHUB_REF#refs/tags/client-v} | ||
|
||
# Download the nuget signing certificate to a local file from the Actions secret | ||
- name: Get the nuget signing certificate | ||
id: cert_file | ||
uses: timheuer/[email protected] | ||
with: | ||
fileName: 'certfile.pfx' | ||
encodedString: ${{ secrets.NUGET_CERTIFICATE }} | ||
- name: Sign the nuget package | ||
|
||
# Sign the Client nuget package with the certificate from the Actions secret | ||
- name: Sign the Client nuget package | ||
working-directory: ./src/Client | ||
run: dotnet nuget sign ./bin/Release/Pieces.OS.Client.${GITHUB_REF#refs/tags/v}.nupkg --certificate-path ${{ steps.cert_file.outputs.filePath }} --certificate-password ${{ secrets.NUGET_CERTIFICATE_PASSWORD }} --timestamper http://timestamp.digicert.com | ||
- name: Push to NuGet | ||
run: dotnet nuget sign ./bin/Release/Pieces.OS.Client.${GITHUB_REF#refs/tags/client-v}.nupkg --certificate-path ${{ steps.cert_file.outputs.filePath }} --certificate-password ${{ secrets.NUGET_CERTIFICATE_PASSWORD }} --timestamper http://timestamp.digicert.com | ||
|
||
# Push the client nuget package to nuget | ||
- name: Push the Client package to NuGet | ||
working-directory: ./src/Client | ||
run: dotnet nuget push ./bin/Release/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://nuget.org | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'extensions-*' | ||
|
||
jobs: | ||
publish-extensions-to-nuget: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
# Set up .NET 8 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: 8.0.* | ||
|
||
# Update the Pieces.OS.Client to use the latest nuget package, not the local packages | ||
- name: Update the Pieces.OS.Client nuget package | ||
working-directory: ./src/Extensions | ||
run: | | ||
dotnet remove reference ../Core/src/Pieces.Os.Core/Pieces.Os.Core.csproj | ||
dotnet remove reference ../Client/Pieces.OS.Client.csproj | ||
dotnet add package Pieces.OS.Client --prerelease | ||
# Build the Microsoft.Extensions.AI implementation package | ||
- name: Build AI Extension | ||
working-directory: ./src/Extensions | ||
run: dotnet build -c Release -p:Version=${GITHUB_REF#refs/tags/extensions-v} | ||
|
||
# Download the nuget signing certificate to a local file from the Actions secret | ||
- name: Get the nuget signing certificate | ||
id: cert_file | ||
uses: timheuer/[email protected] | ||
with: | ||
fileName: 'certfile.pfx' | ||
encodedString: ${{ secrets.NUGET_CERTIFICATE }} | ||
|
||
# Sign the Microsoft.Extensions.AI implementation nuget package with the certificate from the Actions secret | ||
- name: Sign the Extensions nuget package | ||
working-directory: ./src/Extensions | ||
run: dotnet nuget sign ./bin/Release/Pieces.Extensions.AI.${GITHUB_REF#refs/tags/extensions-v}.nupkg --certificate-path ${{ steps.cert_file.outputs.filePath }} --certificate-password ${{ secrets.NUGET_CERTIFICATE_PASSWORD }} --timestamper http://timestamp.digicert.com | ||
|
||
# Push the Microsoft.Extensions.AI implementation nuget package to nuget | ||
- name: Push the Extensions package to NuGet | ||
working-directory: ./src/Extensions | ||
run: dotnet nuget push ./bin/Release/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://nuget.org | ||
|
||
|
This file contains 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
This file contains 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
Oops, something went wrong.