Skip to content

Commit f5336f6

Browse files
committed
Rewritten build and publish steps because github's nuget registry is not compatible with previous used action
1 parent 9758334 commit f5336f6

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

.github/workflows/publish-dev-packages.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,15 @@ jobs:
2525
# Step 2: Checkout the code
2626
- name: Checkout code
2727
uses: actions/checkout@v3
28+
29+
# Step 3: Build project
30+
- name: "Build project"
31+
run: dotnet build --configuration Debug ${{ matrix.project }}/${{ matrix.project }}.csproj
2832

29-
# Step 3: Run the publishing action
30-
- name: Publish on version change
31-
uses: alirezanet/publish-nuget@v3.1.0
32-
with:
33-
PROJECT_FILE_PATH: ${{ matrix.project }}/${{ matrix.project }}.csproj
34-
TAG_COMMIT: false
35-
NUGET_KEY: ${{secrets.GH_PACKAGES_READWRITE}}
36-
NUGET_SOURCE: https://nuget.pkg.github.com/Moonlight-Panel/index.json
33+
# Step 4: Pack project
34+
- name: "Pack project"
35+
run: dotnet pack --configuration Debug --no-build --output . ${{ matrix.project }}/${{ matrix.project }}.csproj
36+
37+
# Step 5: Publish on package registry
38+
- name: Publish on package registry"
39+
run: dotnet nuget push "*.nupkg" --skip-duplicate --api-key ${{secrets.GH_PACKAGES_READWRITE}} --source https://nuget.pkg.github.com/Moonlight-Panel/index.json

0 commit comments

Comments
 (0)