|
10 | 10 |
|
11 | 11 | jobs:
|
12 | 12 |
|
13 |
| - integration-tests: |
14 |
| - name: 'Integration tests' |
15 |
| - runs-on: ubuntu-20.04 |
16 |
| - steps: |
17 |
| - - uses: actions/checkout@v4 |
18 |
| - - name: Setup .NET |
19 |
| - uses: actions/setup-dotnet@v3 |
20 |
| - with: |
21 |
| - dotnet-version: '6.0.x' |
22 |
| - |
23 | 13 | linux-build:
|
24 |
| - name: 'Linux x64' |
25 | 14 | runs-on: ubuntu-20.04
|
26 | 15 | steps:
|
27 | 16 | - uses: actions/checkout@v4
|
|
36 | 25 | make test
|
37 | 26 |
|
38 | 27 | osx-build:
|
39 |
| - name: 'OSX x64' |
40 | 28 | runs-on: macos-13
|
41 | 29 | steps:
|
42 | 30 | - uses: actions/checkout@v4
|
|
53 | 41 | make test
|
54 | 42 |
|
55 | 43 | windows-build:
|
56 |
| - name: 'Windows x64' |
57 | 44 | runs-on: windows-latest
|
58 | 45 | steps:
|
59 | 46 | - uses: actions/checkout@v4
|
|
66 | 53 | dotnet restore
|
67 | 54 | dotnet test -c $env:CONFIGURATION test/Confluent.Kafka.UnitTests/Confluent.Kafka.UnitTests.csproj
|
68 | 55 |
|
69 |
| - windows-artifacts: |
| 56 | + package: |
70 | 57 | name: 'Windows Artifacts'
|
71 |
| - needs: windows-build |
| 58 | + needs: [windows-build, osx-build, linux-build] |
72 | 59 | runs-on: windows-latest
|
73 | 60 | steps:
|
74 | 61 |
|
@@ -98,10 +85,27 @@ jobs:
|
98 | 85 | $vsuffix = "--version-suffix"
|
99 | 86 | }
|
100 | 87 |
|
101 |
| - dotnet pack src/Confluent.Kafka/Confluent.Kafka.csproj --output artifacts -c $env:CONFIGURATION $vsuffix $suffix |
| 88 | + dotnet pack src/Confluent.Kafka/Confluent.Kafka.csproj --output dist -c $env:CONFIGURATION $vsuffix $suffix |
102 | 89 |
|
103 | 90 | - name: Upload artifacts
|
104 | 91 | uses: actions/upload-artifact@v3
|
105 | 92 | with:
|
106 | 93 | name: build-artifacts
|
107 |
| - path: artifacts/ |
| 94 | + path: dist/ |
| 95 | + |
| 96 | + # Publish NuGet packages when a tag is pushed. |
| 97 | + # Tests need to succeed for all components and on all platforms first, |
| 98 | + # including having a tag name that matches the version number. |
| 99 | + publish-release: |
| 100 | + # if: ${{ !github.event.repository.fork && startsWith(github.ref, 'refs/tags/v') }} |
| 101 | + needs: package |
| 102 | + runs-on: ubuntu-latest |
| 103 | + steps: |
| 104 | + - name: Download NuGet package artifacts |
| 105 | + uses: actions/download-artifact@v4 |
| 106 | + with: |
| 107 | + name: nuget-packages |
| 108 | + path: dist |
| 109 | + - name: Publish to NuGet |
| 110 | + run: | |
| 111 | + dotnet nuget push "dist/Confluent.Kafka*.nupkg" --source https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json --api-key ${GITHUB_TOKEN} |
0 commit comments