From 4c077a95cce9344721c3e7afe88899b6923479be Mon Sep 17 00:00:00 2001 From: George Kinsman Date: Wed, 9 Sep 2020 15:04:32 +0100 Subject: [PATCH 1/5] - Publish pre-release packages to github packages to make them easier to use --- .github/workflows/build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1c526add3..e8c12a727 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -65,6 +65,10 @@ jobs: name: packages-${{ matrix.os_name }} path: ./artifacts/packages + - name: Publish pre-release NuGet packages to Github packages + run: dotnet nuget push "artifacts\packages\*.nupkg" --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate --source https://nuget.pkg.github.com/justeat/index.json + if: ${{ runner.os == 'Windows' }} + - name: Push NuGet packages to NuGet.org run: dotnet nuget push "artifacts\packages\*.nupkg" --api-key ${{ secrets.NUGET_TOKEN }} --skip-duplicate --source https://api.nuget.org/v3/index.json if: ${{ github.repository_owner == 'justeat' && startsWith(github.ref, 'refs/tags/v') && runner.os == 'Windows' }} From b98ddebf6a72c52b649ecd33a57193a361306ade Mon Sep 17 00:00:00 2001 From: George Kinsman Date: Wed, 9 Sep 2020 15:15:57 +0100 Subject: [PATCH 2/5] Update .github/workflows/build.yml Co-authored-by: Martin Costello --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e8c12a727..db182d912 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -67,7 +67,7 @@ jobs: - name: Publish pre-release NuGet packages to Github packages run: dotnet nuget push "artifacts\packages\*.nupkg" --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate --source https://nuget.pkg.github.com/justeat/index.json - if: ${{ runner.os == 'Windows' }} + if: ${{ github.repository_owner == 'justeat' && runner.os == 'Windows' }} - name: Push NuGet packages to NuGet.org run: dotnet nuget push "artifacts\packages\*.nupkg" --api-key ${{ secrets.NUGET_TOKEN }} --skip-duplicate --source https://api.nuget.org/v3/index.json From a7509c5fa3f60880c636f9440f5ec14c2b2a62d7 Mon Sep 17 00:00:00 2001 From: George Kinsman Date: Wed, 9 Sep 2020 15:17:44 +0100 Subject: [PATCH 3/5] Update .github/workflows/build.yml Co-authored-by: Martin Costello --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index db182d912..dd4e4691d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -65,7 +65,7 @@ jobs: name: packages-${{ matrix.os_name }} path: ./artifacts/packages - - name: Publish pre-release NuGet packages to Github packages + - name: Publish pre-release NuGet packages to GitHub packages run: dotnet nuget push "artifacts\packages\*.nupkg" --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate --source https://nuget.pkg.github.com/justeat/index.json if: ${{ github.repository_owner == 'justeat' && runner.os == 'Windows' }} From 08148b6d8deea83715cf827c5f3bfa9288275b6a Mon Sep 17 00:00:00 2001 From: George Kinsman Date: Wed, 9 Sep 2020 15:23:59 +0100 Subject: [PATCH 4/5] - Don't fail the build if pushing to github packages fails --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dd4e4691d..4c284956b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -68,6 +68,7 @@ jobs: - name: Publish pre-release NuGet packages to GitHub packages run: dotnet nuget push "artifacts\packages\*.nupkg" --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate --source https://nuget.pkg.github.com/justeat/index.json if: ${{ github.repository_owner == 'justeat' && runner.os == 'Windows' }} + continue-on-error: true - name: Push NuGet packages to NuGet.org run: dotnet nuget push "artifacts\packages\*.nupkg" --api-key ${{ secrets.NUGET_TOKEN }} --skip-duplicate --source https://api.nuget.org/v3/index.json From 68a31f3652967734d70e3d3bc3d3801e91b5e196 Mon Sep 17 00:00:00 2001 From: George Kinsman Date: Wed, 9 Sep 2020 15:44:38 +0100 Subject: [PATCH 5/5] Update .github/workflows/build.yml Co-authored-by: Martin Costello --- .github/workflows/build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4c284956b..eae26fe8a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -67,8 +67,7 @@ jobs: - name: Publish pre-release NuGet packages to GitHub packages run: dotnet nuget push "artifacts\packages\*.nupkg" --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate --source https://nuget.pkg.github.com/justeat/index.json - if: ${{ github.repository_owner == 'justeat' && runner.os == 'Windows' }} - continue-on-error: true + if: ${{ github.repository_owner == 'justeat' && github.ref == 'refs/heads/master' && runner.os == 'Windows' }} - name: Push NuGet packages to NuGet.org run: dotnet nuget push "artifacts\packages\*.nupkg" --api-key ${{ secrets.NUGET_TOKEN }} --skip-duplicate --source https://api.nuget.org/v3/index.json