From af11c6a4b7031ed3825f84c81b53b60f4fb84b60 Mon Sep 17 00:00:00 2001 From: Koen van Ras-Neve Date: Thu, 17 Apr 2025 00:49:17 +0200 Subject: [PATCH 1/3] Testing nuget release pipeline --- .github/workflows/Release.yml | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index bcf4f2a..546c56e 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -13,9 +13,7 @@ on: jobs: build: - runs-on: ubuntu-latest - steps: - uses: actions/checkout@v4 @@ -43,4 +41,24 @@ jobs: uses: actions/upload-artifact@v4.6.2 with: name: uDiscussions-${{ github.event.inputs.package_version }} - path: ${{ env.OUTPUT }}/**/* \ No newline at end of file + path: ${{ env.OUTPUT }}/**/* + release: + if: github.event_name == 'release' + runs-on: ubuntu-latest + needs: [ build ] + steps: + - uses: actions/download-artifact@v4.2.1 + with: + name: packages + path: ${{ env.OUTPUT }} + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 9.0.x + + - name: Publish NuGet packages + run: | + foreach($file in (Get-ChildItem "${{ env.OUTPUT }}" -Recurse -Include *.nupkg)) { + dotnet nuget push $file --api-key "${{ secrets.NUGET_API_KEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate + } \ No newline at end of file From 31ba1d928a9615e0047adae7afa224fafce3b21a Mon Sep 17 00:00:00 2001 From: Koen van Ras-Neve Date: Thu, 17 Apr 2025 00:53:17 +0200 Subject: [PATCH 2/3] Removed release event trigger --- .github/workflows/Release.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index 546c56e..244a754 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -11,6 +11,10 @@ on: description: 'Package version' required: true +defaults: + run: + shell: pwsh + jobs: build: runs-on: ubuntu-latest @@ -43,7 +47,6 @@ jobs: name: uDiscussions-${{ github.event.inputs.package_version }} path: ${{ env.OUTPUT }}/**/* release: - if: github.event_name == 'release' runs-on: ubuntu-latest needs: [ build ] steps: From c04da38c176b8e89124b9144bbceb09a07ee9cb7 Mon Sep 17 00:00:00 2001 From: Koen van Ras-Neve Date: Thu, 17 Apr 2025 00:55:25 +0200 Subject: [PATCH 3/3] Updated package name in release step of pipeline --- .github/workflows/Release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index 244a754..1313d25 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -52,7 +52,7 @@ jobs: steps: - uses: actions/download-artifact@v4.2.1 with: - name: packages + name: uDiscussions-${{ github.event.inputs.package_version }} path: ${{ env.OUTPUT }} - name: Setup .NET