From a4d37b6861c7b499614d23f799f504fa364341ae Mon Sep 17 00:00:00 2001 From: Matthew Elwell Date: Wed, 15 Jan 2025 10:53:06 +0000 Subject: [PATCH 1/5] Bump DOTNET_VERSION in release.yml --- .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 4324c49..ba8a382 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,7 +9,7 @@ env: DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 DOTNET_NOLOGO: true NuGetDirectory: ${{ github.workspace }}/nuget - DOTNET_VERSION: 7.0.x + DOTNET_VERSION: 8.0.x defaults: run: From ef859545213dcb35a8e4fa63a4612bcf07f83d8d Mon Sep 17 00:00:00 2001 From: Matthew Elwell Date: Wed, 15 Jan 2025 10:53:17 +0000 Subject: [PATCH 2/5] temp: add push to workflow trigger --- .github/workflows/release.yml | 55 ++++++++++++++++++----------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ba8a382..9c0957b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,6 +4,7 @@ on: release: types: - published + push: env: DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 @@ -68,33 +69,33 @@ jobs: - name: Validate package run: meziantou.validate-nuget-package (Get-ChildItem "${{ env.NuGetDirectory }}/*.nupkg") --excluded-rule-ids 101,111,74,72,61,12 - publish: - runs-on: ubuntu-latest - needs: - - create_nuget - - validate_nuget - steps: - # Download the NuGet package created in the previous job - - uses: actions/download-artifact@v4 - with: - name: nuget - path: ${{ env.NuGetDirectory }} + # publish: + # runs-on: ubuntu-latest + # needs: + # - create_nuget + # - validate_nuget + # steps: + # # Download the NuGet package created in the previous job + # - uses: actions/download-artifact@v4 + # with: + # name: nuget + # path: ${{ env.NuGetDirectory }} - # Install the .NET SDK indicated in the global.json file - - name: Setup .NET Core - uses: actions/setup-dotnet@v4 - with: - dotnet-version: ${{ env.DOTNET_VERSION }} + # # Install the .NET SDK indicated in the global.json file + # - name: Setup .NET Core + # uses: actions/setup-dotnet@v4 + # with: + # dotnet-version: ${{ env.DOTNET_VERSION }} - # Publish all NuGet packages to NuGet.org - - name: Publish NuGet package - run: | - foreach($file in (Get-ChildItem "${{ env.NuGetDirectory }}" -Recurse -Include *.nupkg)) { - dotnet nuget push $file --api-key "${{ secrets.NUGET_APIKEY }}" --source https://api.nuget.org/v3/index.json - } + # # Publish all NuGet packages to NuGet.org + # - name: Publish NuGet package + # run: | + # foreach($file in (Get-ChildItem "${{ env.NuGetDirectory }}" -Recurse -Include *.nupkg)) { + # dotnet nuget push $file --api-key "${{ secrets.NUGET_APIKEY }}" --source https://api.nuget.org/v3/index.json + # } - - name: Upload Release Asset - uses: shogo82148/actions-upload-release-asset@v1 - with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: ${{ env.NuGetDirectory }}/*.nupkg + # - name: Upload Release Asset + # uses: shogo82148/actions-upload-release-asset@v1 + # with: + # upload_url: ${{ github.event.release.upload_url }} + # asset_path: ${{ env.NuGetDirectory }}/*.nupkg From 5910b3f4d2e9e16bdb7741f3d1f799af169f726c Mon Sep 17 00:00:00 2001 From: Matthew Elwell Date: Wed, 15 Jan 2025 10:55:52 +0000 Subject: [PATCH 3/5] Bump checkout version --- .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 9c0957b..6e3d578 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,7 +20,7 @@ jobs: create_nuget: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 From 024187bd84dd2a27dd250f752a799c35d1822a9d Mon Sep 17 00:00:00 2001 From: Matthew Elwell Date: Wed, 15 Jan 2025 10:56:06 +0000 Subject: [PATCH 4/5] Revert temp workflow trigger --- .github/workflows/release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6e3d578..f0c196c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,7 +4,6 @@ on: release: types: - published - push: env: DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 From 116f1c8201800443c11d05bce4b89316c744fcea Mon Sep 17 00:00:00 2001 From: Matthew Elwell Date: Wed, 15 Jan 2025 10:59:26 +0000 Subject: [PATCH 5/5] uncomment publish step --- .github/workflows/release.yml | 54 +++++++++++++++++------------------ 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f0c196c..36643a6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -68,33 +68,33 @@ jobs: - name: Validate package run: meziantou.validate-nuget-package (Get-ChildItem "${{ env.NuGetDirectory }}/*.nupkg") --excluded-rule-ids 101,111,74,72,61,12 - # publish: - # runs-on: ubuntu-latest - # needs: - # - create_nuget - # - validate_nuget - # steps: - # # Download the NuGet package created in the previous job - # - uses: actions/download-artifact@v4 - # with: - # name: nuget - # path: ${{ env.NuGetDirectory }} + publish: + runs-on: ubuntu-latest + needs: + - create_nuget + - validate_nuget + steps: + # Download the NuGet package created in the previous job + - uses: actions/download-artifact@v4 + with: + name: nuget + path: ${{ env.NuGetDirectory }} - # # Install the .NET SDK indicated in the global.json file - # - name: Setup .NET Core - # uses: actions/setup-dotnet@v4 - # with: - # dotnet-version: ${{ env.DOTNET_VERSION }} + # Install the .NET SDK indicated in the global.json file + - name: Setup .NET Core + uses: actions/setup-dotnet@v4 + with: + dotnet-version: ${{ env.DOTNET_VERSION }} - # # Publish all NuGet packages to NuGet.org - # - name: Publish NuGet package - # run: | - # foreach($file in (Get-ChildItem "${{ env.NuGetDirectory }}" -Recurse -Include *.nupkg)) { - # dotnet nuget push $file --api-key "${{ secrets.NUGET_APIKEY }}" --source https://api.nuget.org/v3/index.json - # } + # Publish all NuGet packages to NuGet.org + - name: Publish NuGet package + run: | + foreach($file in (Get-ChildItem "${{ env.NuGetDirectory }}" -Recurse -Include *.nupkg)) { + dotnet nuget push $file --api-key "${{ secrets.NUGET_APIKEY }}" --source https://api.nuget.org/v3/index.json + } - # - name: Upload Release Asset - # uses: shogo82148/actions-upload-release-asset@v1 - # with: - # upload_url: ${{ github.event.release.upload_url }} - # asset_path: ${{ env.NuGetDirectory }}/*.nupkg + - name: Upload Release Asset + uses: shogo82148/actions-upload-release-asset@v1 + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ${{ env.NuGetDirectory }}/*.nupkg