Skip to content

Merge pull request #152 from microsoft/feature/event-hub-dapr-aspire #300

Merge pull request #152 from microsoft/feature/event-hub-dapr-aspire

Merge pull request #152 from microsoft/feature/event-hub-dapr-aspire #300

name: BuildAndPackage
on:
push:
branches:
- main
paths:
- 'src/AICentral/**'
- 'src/AICentral.QuickStarts/**'
pull_request:
branches:
- main
paths:
- 'src/AICentral/**'
- 'src/AICentral.QuickStarts/**'
workflow_dispatch:
jobs:
build-and-package-app:
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: '5.x'
- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/[email protected]
with:
useConfigFile: true
- name: Test
run: dotnet test src/AICentralTests/AICentralTests.csproj
- name: Test New OpenAI Client
run: dotnet test src/AICentralTestsNewOpenAIClient/AICentralTestsNewOpenAIClient.csproj
- name: Pack Nuget
run: dotnet pack src/AICentral/AICentral.csproj -p:Version=${{ steps.gitversion.outputs.NuGetVersionV2 }} --output ./publish/
- name: Publish to Nuget ${{ steps.gitversion.outputs.NuGetVersionV2 }}
run: dotnet nuget push ./publish/AICentral.${{ steps.gitversion.outputs.NuGetVersionV2 }}.nupkg --api-key ${{ secrets.NUGET_PUBLISH_KEY }} --source https://api.nuget.org/v3/index.json