Skip to content

Making changes to the publish CLI to for MOS Publish, Custom connector creation and App registrations #1185

Making changes to the publish CLI to for MOS Publish, Custom connector creation and App registrations

Making changes to the publish CLI to for MOS Publish, Custom connector creation and App registrations #1185

Workflow file for this run

name: CI - Build, Test, and Publish
permissions:
contents: read
on:
push:
branches: main
pull_request:
branches: main
jobs:
dotnet-sdk:
name: .NET SDK
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
contents: write
defaults:
run:
working-directory: ./src
strategy:
matrix:
dotnet-version: ["8.0.x"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for nbgv to calculate version
- name: Setup .NET ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Setup Nerdbank.GitVersioning
uses: dotnet/nbgv@master
with:
setAllVars: true
- name: Restore source dependencies
run: dotnet restore dirs.proj
- name: Restore test dependencies
run: dotnet restore tests.proj
- name: Build source projects
run: dotnet build dirs.proj --no-restore --configuration Release
- name: Build test projects
run: dotnet build tests.proj --no-restore --configuration Release
- name: Run tests
run: dotnet test tests.proj --no-build --configuration Release --verbosity normal --blame-hang --blame-hang-timeout 5min
- name: Pack NuGet packages
id: pack
run: dotnet pack dirs.proj --configuration Release --output ../NuGetPackages
- name: Verify package was created
run: |
if ! ls ../NuGetPackages/*.nupkg 1> /dev/null 2>&1; then
echo "Error: No package file was created"
exit 1
fi
echo "✅ Package created successfully (NU5017 is a known false positive with centralized package management)"
ls -lh ../NuGetPackages/*.nupkg
- name: Copy NuGet packages
run: |
mkdir -p ~/drop/dotnet/NuGetPackages && cp -v ../NuGetPackages/*.nupkg $_
- name: Upload NuGet packages as artifact
uses: actions/upload-artifact@v4
with:
name: dotnet-packages-${{ github.run_number }}
path: ~/drop/dotnet/NuGetPackages/*