Skip to content

Commit ede76f3

Browse files
authored
Merge pull request #48 from NeverMorewd/NeverMorewd-build-wpf
Update release.yml
2 parents 5fa4a4f + ff46eaf commit ede76f3

1 file changed

Lines changed: 61 additions & 8 deletions

File tree

.github/workflows/release.yml

Lines changed: 61 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,79 @@ on:
77
branches: [ "action/release" ]
88

99
jobs:
10-
nuget:
10+
nuget-abstraction:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout
1414
uses: actions/checkout@v4.1.1
15-
15+
1616
- 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+
1919
- 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
2142

2243
- 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
2445

2546
- 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
2751
2852
- name: Upload a Build Artifact
2953
uses: actions/upload-artifact@v4.3.1
3054
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
3285
path: ./nugets

0 commit comments

Comments
 (0)