-
Notifications
You must be signed in to change notification settings - Fork 185
50 lines (46 loc) · 1.48 KB
/
dotnet-publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#
# This workflow will publish .NET SDK.
#
name: DOTNET Publish
on:
workflow_dispatch:
push:
branches: ['main']
paths: ['dotnet/**']
permissions: read-all
jobs:
build-test-lint:
name: Build/Test/Lint
uses: ./.github/workflows/dotnet-build-test-lint.yml
permissions: read-all
publish:
name: Publish
needs: build-test-lint
runs-on: windows-latest
strategy:
matrix:
dotnet-version: ['6.0', '7.0']
fail-fast: false
defaults:
run:
shell: bash
working-directory: dotnet/packages/Microsoft.TeamsAI/
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup .NET ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4.1.0
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Pack
run: dotnet pack --output . --configuration Release Microsoft.TeamsAI/Microsoft.Teams.AI.csproj
- name: Publish
run: dotnet nuget push *.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source https://nuget.pkg.github.com/microsoft/index.json --skip-duplicate --no-symbols
- name: Upload
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: nupkg-dotnet-${{ matrix.dotnet-version }}
path: dotnet/packages/Microsoft.TeamsAI/*.nupkg