microsoft/teams.net
Publicmirrored fromhttps://github.com/microsoft/teams.netAvailable
.github/workflows/build-test-lint.yml
48lines · modecode
| 1 | name: Build & Test & Lint |
| 2 | |
| 3 | on: |
| 4 | workflow_call: |
| 5 | workflow_dispatch: |
| 6 | pull_request: |
| 7 | branches: ['main', 'releases/*'] |
| 8 | push: |
| 9 | branches: ['main', 'releases/*'] |
| 10 | merge_group: |
| 11 | |
| 12 | permissions: read-all |
| 13 | |
| 14 | jobs: |
| 15 | build-test-lint: |
| 16 | name: Build & Test & Lint |
| 17 | runs-on: ubuntu-latest |
| 18 | permissions: |
| 19 | contents: read |
| 20 | |
| 21 | steps: |
| 22 | - name: Checkout |
| 23 | uses: actions/checkout@v4 |
| 24 | with: |
| 25 | fetch-depth: 0 |
| 26 | |
| 27 | - name: Setup .NET |
| 28 | uses: actions/setup-dotnet@v4 |
| 29 | with: |
| 30 | dotnet-version: '9.0' |
| 31 | |
| 32 | - name: Restore |
| 33 | run: dotnet restore |
| 34 | |
| 35 | - name: Build |
| 36 | run: dotnet build --no-restore --configuration Release |
| 37 | |
| 38 | - name: Test |
| 39 | run: dotnet test --no-restore --verbosity normal --logger trx --configuration Release |
| 40 | |
| 41 | - name: Pack |
| 42 | run: dotnet pack --no-restore --configuration Release --output ./nupkgs |
| 43 | |
| 44 | - name: Upload nupkg as workflow artifact |
| 45 | uses: actions/upload-artifact@v4 |
| 46 | with: |
| 47 | name: nupkg |
| 48 | path: ./nupkgs/*.nupkg |