|
7 | 7 | branches: [ "action/release" ] |
8 | 8 |
|
9 | 9 | jobs: |
10 | | - nuget: |
| 10 | + nuget-abstraction: |
11 | 11 | runs-on: ubuntu-latest |
12 | 12 | steps: |
13 | 13 | - name: Checkout |
14 | 14 | uses: actions/checkout@v4.1.1 |
15 | | - |
| 15 | + |
16 | 16 | - name: Build the Project |
17 | | - run: dotnet build ./src/Lemon.ModuleNavigation.Avaloniaui --configuration Release |
18 | | - |
| 17 | + run: dotnet build ./src/Lemon.ModuleNavigation --configuration Release |
| 18 | + |
19 | 19 | - name: Pack Nuget |
20 | | - run: dotnet pack ./src/Lemon.ModuleNavigation -o ./nugets |
| 20 | + run: dotnet pack ./src/Lemon.ModuleNavigation --configuration Release --no-build -o ./nugets |
| 21 | + |
| 22 | + - name: Publish NuGet package |
| 23 | + run: | |
| 24 | + if [ -n "$(find ./nugets -name '*.nupkg')" ]; then |
| 25 | + dotnet nuget push "./nugets/*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate |
| 26 | + fi |
| 27 | +
|
| 28 | + - name: Upload a Build Artifact |
| 29 | + uses: actions/upload-artifact@v4.3.1 |
| 30 | + with: |
| 31 | + name: nugets-abstraction |
| 32 | + path: ./nugets |
| 33 | + |
| 34 | + nuget-avaloniaui: |
| 35 | + runs-on: ubuntu-latest |
| 36 | + steps: |
| 37 | + - name: Checkout |
| 38 | + uses: actions/checkout@v4.1.1 |
| 39 | + |
| 40 | + - name: Build the Project |
| 41 | + run: dotnet build ./src/Lemon.ModuleNavigation.Avaloniaui --configuration Release |
21 | 42 |
|
22 | 43 | - name: Pack Nuget |
23 | | - run: dotnet pack ./src/Lemon.ModuleNavigation.Avaloniaui -o ./nugets |
| 44 | + run: dotnet pack ./src/Lemon.ModuleNavigation.Avaloniaui --configuration Release --no-build -o ./nugets |
24 | 45 |
|
25 | 46 | - name: Publish NuGet package |
26 | | - run: dotnet nuget push "./nugets/*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate |
| 47 | + run: | |
| 48 | + if [ -n "$(find ./nugets -name '*.nupkg')" ]; then |
| 49 | + dotnet nuget push "./nugets/*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate |
| 50 | + fi |
27 | 51 |
|
28 | 52 | - name: Upload a Build Artifact |
29 | 53 | uses: actions/upload-artifact@v4.3.1 |
30 | 54 | with: |
31 | | - name: nugets |
| 55 | + name: nugets-avaloniaui |
| 56 | + path: ./nugets |
| 57 | + |
| 58 | + nuget-wpf: |
| 59 | + runs-on: windows-latest |
| 60 | + steps: |
| 61 | + - name: Checkout |
| 62 | + uses: actions/checkout@v4.1.1 |
| 63 | + |
| 64 | + - name: Setup .NET 8 |
| 65 | + uses: actions/setup-dotnet@v3 |
| 66 | + with: |
| 67 | + dotnet-version: 8.0.x |
| 68 | + |
| 69 | + - name: Build the WPF Project |
| 70 | + run: dotnet build ./src/Lemon.ModuleNavigation.Wpf --configuration Release |
| 71 | + |
| 72 | + - name: Pack WPF Nuget |
| 73 | + run: dotnet pack ./src/Lemon.ModuleNavigation.Wpf --configuration Release --no-build -o ./nugets |
| 74 | + |
| 75 | + - name: Publish WPF NuGet package |
| 76 | + run: | |
| 77 | + if (Test-Path "./nugets/*.nupkg") { |
| 78 | + dotnet nuget push "./nugets/*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate |
| 79 | + } |
| 80 | +
|
| 81 | + - name: Upload WPF NuGet Artifact |
| 82 | + uses: actions/upload-artifact@v4.3.1 |
| 83 | + with: |
| 84 | + name: nugets-wpf |
32 | 85 | path: ./nugets |
0 commit comments