Fix missing Messaging Bot API permissions and incorrect permission in… #205
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: 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 | |
| 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 | |
| - 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/* |