Skip to content

Commit 785d586

Browse files
committed
1st attempt to fix publish workflow
1 parent cc38028 commit 785d586

File tree

1 file changed

+19
-14
lines changed

1 file changed

+19
-14
lines changed

.github/workflows/publish.yml

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,33 @@ on:
88
jobs:
99
build:
1010
runs-on: windows-latest
11-
name: Update NuGet
11+
strategy:
12+
matrix:
13+
project: ['kate.shared', 'kate.shared.CommandLine', 'kate.shared.EtoForms']
14+
name: Create NuGet Package
15+
permissions:
16+
packages: write
17+
contents: read
1218
steps:
13-
1419
- name: Checkout repository
1520
uses: actions/checkout@master
1621

17-
# latest image has .NET already installed!
18-
# - name: Setup .NET environment
19-
# uses: actions/setup-dotnet@v1
20-
# with:
21-
# dotnet-version: '2.2.105'
22+
- name: Setup .NET
23+
uses: actions/setup-dotnet@v4
24+
with:
25+
dotnet-version: |
26+
6.x
27+
8.x
28+
9.x
2229
2330
- name: Build solution and generate NuGet package
2431
run: |
25-
cd kate.shared
26-
dotnet pack -c Release -o out
27-
28-
- name: Install NuGet client
29-
uses: warrenbuckley/Setup-Nuget@v1
32+
cd ${{ matrix.project }}
33+
dotnet build -c Release
34+
dotnet pack -c Release -o out --include-symbols
3035
3136
- name: Add private GitHub registry to NuGet
32-
run: nuget sources add -name "GPR" -Source https://nuget.pkg.github.com/ktwrd/index.json -Username ktwrd -Password ${{ secrets.GITHUB_TOKEN }}
37+
run: dotnet nuget sources add -name "GPR" -Source https://nuget.pkg.github.com/ktwrd/index.json -Username ktwrd -Password ${{ secrets.GITHUB_TOKEN }}
3338

3439
- name: Push generated package to GitHub registry
35-
run: nuget push .\kate.shared\out\*.nupkg -Source "GPR" -SkipDuplicate
40+
run: dotnet nuget push .\${{matrix.project}}\out\*.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source "GPR" --skip-duplicate

0 commit comments

Comments
 (0)