Merge pull request #762 from betalgo/dev #99
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: Build And Deploy Betalgo.Ranul.OpenAI | |
| on: | |
| push: | |
| branches: [ master ] | |
| jobs: | |
| build-test: | |
| permissions: | |
| contents: read | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 9.0.x | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build -c Release --no-restore | |
| - name: Test | |
| run: dotnet test -c Release --no-build --verbosity normal | |
| build-artifacts: | |
| needs: build-test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 9.0.x | |
| - name: Build (Release, Utilities -> SDK -> Contracts) | |
| run: dotnet build OpenAI.Utilities/Betalgo.OpenAI.Utilities.csproj -c Release | |
| - name: Upload release bins | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: release-bins | |
| path: | | |
| OpenAI.Utilities/bin/Release/ | |
| OpenAI.SDK/bin/Release/ | |
| Betalgo.Ranul.OpenAI.Contracts/bin/Release/ | |
| publish-sdk: | |
| needs: build-artifacts | |
| permissions: | |
| contents: write | |
| packages: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: release-bins | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 9.0.x | |
| - name: Publish OpenAI | |
| uses: Betalgo/[email protected] | |
| with: | |
| project-file: OpenAI.SDK/Betalgo.Ranul.OpenAI.csproj | |
| nuget-api-key: ${{ secrets.NUGET_KEY }} | |
| clean: false | |
| tag-commit: true | |
| tag-format: Betalgo.Ranul.OpenAI-v* | |
| publish-contracts: | |
| needs: build-artifacts | |
| permissions: | |
| contents: write | |
| packages: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: release-bins | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 9.0.x | |
| - name: Publish Contracts | |
| uses: Betalgo/[email protected] | |
| with: | |
| project-file: Betalgo.Ranul.OpenAI.Contracts/Betalgo.Ranul.OpenAI.Contracts.csproj | |
| nuget-api-key: ${{ secrets.NUGET_KEY }} | |
| clean: false | |
| tag-commit: true | |
| tag-format: Betalgo.Ranul.OpenAI.Contracts-v* | |
| publish-utilities: | |
| needs: build-artifacts | |
| permissions: | |
| contents: write | |
| packages: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: release-bins | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 9.0.x | |
| - name: Publish OpenAI Utilities | |
| uses: Betalgo/[email protected] | |
| with: | |
| project-file: OpenAI.Utilities/Betalgo.OpenAI.Utilities.csproj | |
| nuget-api-key: ${{ secrets.NUGET_KEY_UTILITIES }} | |
| clean: false | |
| tag-commit: true | |
| tag-format: Betalgo.OpenAI.Utilities-v* |