From a59605692707851d6396b81b466302e9752e56ee Mon Sep 17 00:00:00 2001 From: Jamie Cansdale Date: Tue, 10 Mar 2020 00:39:20 +0000 Subject: [PATCH 01/17] Add GitHub Actions workflow --- .github/workflows/dotnetcore.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/dotnetcore.yml diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml new file mode 100644 index 00000000..bc95eee5 --- /dev/null +++ b/.github/workflows/dotnetcore.yml @@ -0,0 +1,32 @@ +name: .NET + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: windows-latest + + steps: + - uses: actions/checkout@v2 + + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v1.0.0 + - run: msbuild Octokit.GraphQL.sln + + - uses: nuget/setup-nuget@v1 + with: + nuget-version: '5.x' + - run: nuget pack + + - name: Setup .NET Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 3.1.101 + - run: dotnet test -c Release --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.UnitTests\Octokit.GraphQL.UnitTests.csproj + - run: dotnet test -c Release --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.Core.UnitTests\Octokit.GraphQL.Core.UnitTests.csproj + - run: dotnet test -c Release --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.Core.Generation.UnitTests\Octokit.GraphQL.Core.Generation.UnitTests.csproj From ae448346d1ebd3f7befa7c27d707e1b62bbf2eba Mon Sep 17 00:00:00 2001 From: Jamie Cansdale Date: Tue, 10 Mar 2020 00:48:06 +0000 Subject: [PATCH 02/17] Build using .NET Core --- .github/workflows/dotnetcore.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml index bc95eee5..aa8834a4 100644 --- a/.github/workflows/dotnetcore.yml +++ b/.github/workflows/dotnetcore.yml @@ -13,20 +13,19 @@ jobs: steps: - uses: actions/checkout@v2 + + - name: Setup .NET Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 3.1.101 - - name: Add msbuild to PATH - uses: microsoft/setup-msbuild@v1.0.0 - - run: msbuild Octokit.GraphQL.sln + - run: dotnet build Octokit.GraphQL.sln - uses: nuget/setup-nuget@v1 with: nuget-version: '5.x' - run: nuget pack - - name: Setup .NET Core - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 3.1.101 - run: dotnet test -c Release --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.UnitTests\Octokit.GraphQL.UnitTests.csproj - run: dotnet test -c Release --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.Core.UnitTests\Octokit.GraphQL.Core.UnitTests.csproj - run: dotnet test -c Release --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.Core.Generation.UnitTests\Octokit.GraphQL.Core.Generation.UnitTests.csproj From d28e06544eab464290cb2abfd3371fb3c2546abe Mon Sep 17 00:00:00 2001 From: Jamie Cansdale Date: Tue, 10 Mar 2020 00:52:50 +0000 Subject: [PATCH 03/17] Build Release configuration --- .github/workflows/dotnetcore.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml index aa8834a4..e9394334 100644 --- a/.github/workflows/dotnetcore.yml +++ b/.github/workflows/dotnetcore.yml @@ -19,7 +19,7 @@ jobs: with: dotnet-version: 3.1.101 - - run: dotnet build Octokit.GraphQL.sln + - run: dotnet build Octokit.GraphQL.sln -c Release - uses: nuget/setup-nuget@v1 with: From 218a379ff2cc9ba9708fa97539ffa8e0f827d105 Mon Sep 17 00:00:00 2001 From: Jamie Cansdale Date: Tue, 10 Mar 2020 01:04:05 +0000 Subject: [PATCH 04/17] Push package to nuget.pkg.github.com --- .github/workflows/dotnetcore.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml index e9394334..579b25d2 100644 --- a/.github/workflows/dotnetcore.yml +++ b/.github/workflows/dotnetcore.yml @@ -18,13 +18,17 @@ jobs: uses: actions/setup-dotnet@v1 with: dotnet-version: 3.1.101 - + source-url: https://nuget.pkg.github.com/octokit/index.json + env: + NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} + - run: dotnet build Octokit.GraphQL.sln -c Release - uses: nuget/setup-nuget@v1 with: nuget-version: '5.x' - run: nuget pack + - run: dotnet nuget push *.nupkg -s github - run: dotnet test -c Release --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.UnitTests\Octokit.GraphQL.UnitTests.csproj - run: dotnet test -c Release --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.Core.UnitTests\Octokit.GraphQL.Core.UnitTests.csproj From abca8b8a5471034df5595899a27e6d5c09a8159b Mon Sep 17 00:00:00 2001 From: Jamie Cansdale Date: Tue, 10 Mar 2020 01:08:08 +0000 Subject: [PATCH 05/17] Push package to default source --- .github/workflows/dotnetcore.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml index 579b25d2..95dd65eb 100644 --- a/.github/workflows/dotnetcore.yml +++ b/.github/workflows/dotnetcore.yml @@ -28,7 +28,7 @@ jobs: with: nuget-version: '5.x' - run: nuget pack - - run: dotnet nuget push *.nupkg -s github + - run: dotnet nuget push *.nupkg - run: dotnet test -c Release --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.UnitTests\Octokit.GraphQL.UnitTests.csproj - run: dotnet test -c Release --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.Core.UnitTests\Octokit.GraphQL.Core.UnitTests.csproj From a8680f98cc3f015afd6c415583d6452e3b50e9bd Mon Sep 17 00:00:00 2001 From: Jamie Cansdale Date: Tue, 10 Mar 2020 01:13:55 +0000 Subject: [PATCH 06/17] Add a repository element to nuspec file --- Octokit.GraphQL.nuspec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Octokit.GraphQL.nuspec b/Octokit.GraphQL.nuspec index 772f1ad6..4d1b00ae 100644 --- a/Octokit.GraphQL.nuspec +++ b/Octokit.GraphQL.nuspec @@ -5,6 +5,7 @@ 0.1.4-beta GitHub GitHub + https://github.com/grokys/octokit.graphql/blob/master/LICENSE.txt https://github.com/grokys/octokit.graphql https://f.cloud.github.com/assets/19977/1441274/160fba8c-41a9-11e3-831d-61d88fa886f4.png @@ -22,4 +23,4 @@ - \ No newline at end of file + From 5d9b260c893de9ba8875a2ad0c42935fc22923bf Mon Sep 17 00:00:00 2001 From: Jamie Cansdale Date: Tue, 10 Mar 2020 18:31:47 +0000 Subject: [PATCH 07/17] Publish after running tests --- .github/workflows/dotnetcore.yml | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml index 95dd65eb..1b494993 100644 --- a/.github/workflows/dotnetcore.yml +++ b/.github/workflows/dotnetcore.yml @@ -1,4 +1,4 @@ -name: .NET +name: Build and Publish on: push: @@ -8,13 +8,11 @@ on: jobs: build: - runs-on: windows-latest - steps: - uses: actions/checkout@v2 - - name: Setup .NET Core + - name: Setup .NET Core and GitHub Packages uses: actions/setup-dotnet@v1 with: dotnet-version: 3.1.101 @@ -22,14 +20,18 @@ jobs: env: NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} - - run: dotnet build Octokit.GraphQL.sln -c Release - - - uses: nuget/setup-nuget@v1 - with: - nuget-version: '5.x' - - run: nuget pack - - run: dotnet nuget push *.nupkg - + - name: Build using .NET Core + run: dotnet build Octokit.GraphQL.sln -c Release + - run: dotnet test -c Release --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.UnitTests\Octokit.GraphQL.UnitTests.csproj - run: dotnet test -c Release --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.Core.UnitTests\Octokit.GraphQL.Core.UnitTests.csproj - run: dotnet test -c Release --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.Core.Generation.UnitTests\Octokit.GraphQL.Core.Generation.UnitTests.csproj + + - name: Create NuGet package + uses: nuget/setup-nuget@v1 + with: + nuget-version: '5.x' + - run: nuget pack + + - name: Publish to GitHub Packages + run: dotnet nuget push *.nupkg From 272aa3f7585c3442b34ec810e336e6f43d8e95e1 Mon Sep 17 00:00:00 2001 From: Jamie Cansdale Date: Tue, 10 Mar 2020 18:37:19 +0000 Subject: [PATCH 08/17] Fix step names --- .github/workflows/dotnetcore.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml index 1b494993..f69dd87b 100644 --- a/.github/workflows/dotnetcore.yml +++ b/.github/workflows/dotnetcore.yml @@ -27,11 +27,13 @@ jobs: - run: dotnet test -c Release --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.Core.UnitTests\Octokit.GraphQL.Core.UnitTests.csproj - run: dotnet test -c Release --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.Core.Generation.UnitTests\Octokit.GraphQL.Core.Generation.UnitTests.csproj - - name: Create NuGet package + - name: Setup NuGet uses: nuget/setup-nuget@v1 with: nuget-version: '5.x' - - run: nuget pack + + - name: Create NuGet package + run: nuget pack - name: Publish to GitHub Packages run: dotnet nuget push *.nupkg From 58e45b31ddbaf29bde8e4a1900f9bd711b0d3ada Mon Sep 17 00:00:00 2001 From: Jamie Cansdale Date: Tue, 10 Mar 2020 18:41:54 +0000 Subject: [PATCH 09/17] Only publish commits to master --- .github/workflows/dotnetcore.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml index f69dd87b..c46952a5 100644 --- a/.github/workflows/dotnetcore.yml +++ b/.github/workflows/dotnetcore.yml @@ -36,4 +36,5 @@ jobs: run: nuget pack - name: Publish to GitHub Packages + if: github.ref == 'refs/heads/master' run: dotnet nuget push *.nupkg From d1ea15d05b16d6bed09451d5e0a2d2840e258e41 Mon Sep 17 00:00:00 2001 From: Jamie Cansdale Date: Tue, 10 Mar 2020 18:49:16 +0000 Subject: [PATCH 10/17] Add test step names --- .github/workflows/dotnetcore.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml index c46952a5..a6fa768d 100644 --- a/.github/workflows/dotnetcore.yml +++ b/.github/workflows/dotnetcore.yml @@ -23,9 +23,12 @@ jobs: - name: Build using .NET Core run: dotnet build Octokit.GraphQL.sln -c Release - - run: dotnet test -c Release --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.UnitTests\Octokit.GraphQL.UnitTests.csproj - - run: dotnet test -c Release --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.Core.UnitTests\Octokit.GraphQL.Core.UnitTests.csproj - - run: dotnet test -c Release --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.Core.Generation.UnitTests\Octokit.GraphQL.Core.Generation.UnitTests.csproj + - name: Run Octokit.GraphQL.UnitTests + run: dotnet test -c Release --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.UnitTests\Octokit.GraphQL.UnitTests.csproj + - name: Run Octokit.GraphQL.Core.UnitTests + run: dotnet test -c Release --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.Core.UnitTests\Octokit.GraphQL.Core.UnitTests.csproj + - name: Run Octokit.GraphQL.Core.Generation.UnitTests + run: dotnet test -c Release --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.Core.Generation.UnitTests\Octokit.GraphQL.Core.Generation.UnitTests.csproj - name: Setup NuGet uses: nuget/setup-nuget@v1 From 05eea4ba2a891905dd7ecc9a14eb7718cd9bce0d Mon Sep 17 00:00:00 2001 From: Jamie Cansdale Date: Wed, 11 Mar 2020 10:10:10 +0000 Subject: [PATCH 11/17] Split build and publish into separate jobs --- .github/workflows/dotnetcore.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml index a6fa768d..c629af6a 100644 --- a/.github/workflows/dotnetcore.yml +++ b/.github/workflows/dotnetcore.yml @@ -5,6 +5,7 @@ on: branches: [ master ] pull_request: branches: [ master ] + jobs: build: @@ -29,7 +30,11 @@ jobs: run: dotnet test -c Release --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.Core.UnitTests\Octokit.GraphQL.Core.UnitTests.csproj - name: Run Octokit.GraphQL.Core.Generation.UnitTests run: dotnet test -c Release --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.Core.Generation.UnitTests\Octokit.GraphQL.Core.Generation.UnitTests.csproj - + publish: + needs: [build] + if: github.ref == 'refs/heads/master' + runs-on: windows-latest + steps: - name: Setup NuGet uses: nuget/setup-nuget@v1 with: @@ -39,5 +44,4 @@ jobs: run: nuget pack - name: Publish to GitHub Packages - if: github.ref == 'refs/heads/master' run: dotnet nuget push *.nupkg From 96a1a0d6334099be5633583264b8699ac632d630 Mon Sep 17 00:00:00 2001 From: Jamie Cansdale Date: Wed, 11 Mar 2020 10:15:59 +0000 Subject: [PATCH 12/17] Split build and tests into separate jobs --- .github/workflows/dotnetcore.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml index c629af6a..cba0f138 100644 --- a/.github/workflows/dotnetcore.yml +++ b/.github/workflows/dotnetcore.yml @@ -1,11 +1,10 @@ -name: Build and Publish +name: Build, test and publish on: push: branches: [ master ] pull_request: branches: [ master ] - jobs: build: @@ -22,8 +21,11 @@ jobs: NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} - name: Build using .NET Core - run: dotnet build Octokit.GraphQL.sln -c Release - + run: dotnet build Octokit.GraphQL.sln -c Release + test: + needs: [build] + runs-on: windows-latest + steps: - name: Run Octokit.GraphQL.UnitTests run: dotnet test -c Release --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.UnitTests\Octokit.GraphQL.UnitTests.csproj - name: Run Octokit.GraphQL.Core.UnitTests @@ -31,7 +33,7 @@ jobs: - name: Run Octokit.GraphQL.Core.Generation.UnitTests run: dotnet test -c Release --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.Core.Generation.UnitTests\Octokit.GraphQL.Core.Generation.UnitTests.csproj publish: - needs: [build] + needs: [build,test] if: github.ref == 'refs/heads/master' runs-on: windows-latest steps: From 0f288be84f76e845cbd621dd59c60962cb80e4f6 Mon Sep 17 00:00:00 2001 From: Jamie Cansdale Date: Wed, 11 Mar 2020 15:37:18 +0000 Subject: [PATCH 13/17] Do checkout and setup actions for each job --- .github/workflows/dotnetcore.yml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml index cba0f138..37501d4d 100644 --- a/.github/workflows/dotnetcore.yml +++ b/.github/workflows/dotnetcore.yml @@ -11,14 +11,10 @@ jobs: runs-on: windows-latest steps: - uses: actions/checkout@v2 - - name: Setup .NET Core and GitHub Packages uses: actions/setup-dotnet@v1 with: dotnet-version: 3.1.101 - source-url: https://nuget.pkg.github.com/octokit/index.json - env: - NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} - name: Build using .NET Core run: dotnet build Octokit.GraphQL.sln -c Release @@ -26,6 +22,12 @@ jobs: needs: [build] runs-on: windows-latest steps: + - uses: actions/checkout@v2 + - name: Setup .NET Core and GitHub Packages + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 3.1.101 + - name: Run Octokit.GraphQL.UnitTests run: dotnet test -c Release --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.UnitTests\Octokit.GraphQL.UnitTests.csproj - name: Run Octokit.GraphQL.Core.UnitTests @@ -37,6 +39,14 @@ jobs: if: github.ref == 'refs/heads/master' runs-on: windows-latest steps: + - uses: actions/checkout@v2 + - name: Setup .NET Core and GitHub Packages + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 3.1.101 + source-url: https://nuget.pkg.github.com/octokit/index.json + env: + NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} - name: Setup NuGet uses: nuget/setup-nuget@v1 with: From b35ede8485a2e082bc94987d027dc2b9c3fa2768 Mon Sep 17 00:00:00 2001 From: Jamie Cansdale Date: Wed, 11 Mar 2020 15:52:54 +0000 Subject: [PATCH 14/17] Define env.config for all jobs --- .github/workflows/dotnetcore.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml index 37501d4d..6c9d444f 100644 --- a/.github/workflows/dotnetcore.yml +++ b/.github/workflows/dotnetcore.yml @@ -6,6 +6,9 @@ on: pull_request: branches: [ master ] +env: + config: Release + jobs: build: runs-on: windows-latest @@ -17,7 +20,7 @@ jobs: dotnet-version: 3.1.101 - name: Build using .NET Core - run: dotnet build Octokit.GraphQL.sln -c Release + run: dotnet build Octokit.GraphQL.sln -c ${{ env.config }} test: needs: [build] runs-on: windows-latest @@ -29,11 +32,11 @@ jobs: dotnet-version: 3.1.101 - name: Run Octokit.GraphQL.UnitTests - run: dotnet test -c Release --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.UnitTests\Octokit.GraphQL.UnitTests.csproj + run: dotnet test -c ${{ env.config }} --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.UnitTests\Octokit.GraphQL.UnitTests.csproj - name: Run Octokit.GraphQL.Core.UnitTests - run: dotnet test -c Release --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.Core.UnitTests\Octokit.GraphQL.Core.UnitTests.csproj + run: dotnet test -c ${{ env.config }} --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.Core.UnitTests\Octokit.GraphQL.Core.UnitTests.csproj - name: Run Octokit.GraphQL.Core.Generation.UnitTests - run: dotnet test -c Release --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.Core.Generation.UnitTests\Octokit.GraphQL.Core.Generation.UnitTests.csproj + run: dotnet test -c ${{ env.config }} --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.Core.Generation.UnitTests\Octokit.GraphQL.Core.Generation.UnitTests.csproj publish: needs: [build,test] if: github.ref == 'refs/heads/master' @@ -52,6 +55,9 @@ jobs: with: nuget-version: '5.x' + - name: Build using .NET Core + run: dotnet build Octokit.GraphQL.sln -c ${{ env.config }} + - name: Create NuGet package run: nuget pack From 4eda48da3594d69ff1d43231267290233331beca Mon Sep 17 00:00:00 2001 From: Jamie Cansdale Date: Wed, 18 Mar 2020 00:13:26 +0000 Subject: [PATCH 15/17] Only publish package from master branch --- .github/workflows/dotnetcore.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml index 6c9d444f..b48d03f0 100644 --- a/.github/workflows/dotnetcore.yml +++ b/.github/workflows/dotnetcore.yml @@ -62,4 +62,5 @@ jobs: run: nuget pack - name: Publish to GitHub Packages + if: github.ref == 'refs/heads/master' run: dotnet nuget push *.nupkg From 64543216e31f97f41b75894884f7f359c4e6ce37 Mon Sep 17 00:00:00 2001 From: Jamie Cansdale Date: Wed, 18 Mar 2020 00:20:31 +0000 Subject: [PATCH 16/17] Combine, build test and publish --- .github/workflows/dotnetcore.yml | 40 +++++++------------------------- 1 file changed, 9 insertions(+), 31 deletions(-) diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml index b48d03f0..84f18f60 100644 --- a/.github/workflows/dotnetcore.yml +++ b/.github/workflows/dotnetcore.yml @@ -10,36 +10,7 @@ env: config: Release jobs: - build: - runs-on: windows-latest - steps: - - uses: actions/checkout@v2 - - name: Setup .NET Core and GitHub Packages - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 3.1.101 - - - name: Build using .NET Core - run: dotnet build Octokit.GraphQL.sln -c ${{ env.config }} - test: - needs: [build] - runs-on: windows-latest - steps: - - uses: actions/checkout@v2 - - name: Setup .NET Core and GitHub Packages - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 3.1.101 - - - name: Run Octokit.GraphQL.UnitTests - run: dotnet test -c ${{ env.config }} --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.UnitTests\Octokit.GraphQL.UnitTests.csproj - - name: Run Octokit.GraphQL.Core.UnitTests - run: dotnet test -c ${{ env.config }} --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.Core.UnitTests\Octokit.GraphQL.Core.UnitTests.csproj - - name: Run Octokit.GraphQL.Core.Generation.UnitTests - run: dotnet test -c ${{ env.config }} --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.Core.Generation.UnitTests\Octokit.GraphQL.Core.Generation.UnitTests.csproj - publish: - needs: [build,test] - if: github.ref == 'refs/heads/master' + build-test-publish: runs-on: windows-latest steps: - uses: actions/checkout@v2 @@ -56,7 +27,14 @@ jobs: nuget-version: '5.x' - name: Build using .NET Core - run: dotnet build Octokit.GraphQL.sln -c ${{ env.config }} + run: dotnet build Octokit.GraphQL.sln -c ${{ env.config }} + + - name: Run Octokit.GraphQL.UnitTests + run: dotnet test -c ${{ env.config }} --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.UnitTests\Octokit.GraphQL.UnitTests.csproj + - name: Run Octokit.GraphQL.Core.UnitTests + run: dotnet test -c ${{ env.config }} --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.Core.UnitTests\Octokit.GraphQL.Core.UnitTests.csproj + - name: Run Octokit.GraphQL.Core.Generation.UnitTests + run: dotnet test -c ${{ env.config }} --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.Core.Generation.UnitTests\Octokit.GraphQL.Core.Generation.UnitTests.csproj - name: Create NuGet package run: nuget pack From 713f42ce896e0847bd6c73f9e75e15ee5d2fdc77 Mon Sep 17 00:00:00 2001 From: Jamie Cansdale Date: Wed, 18 Mar 2020 00:25:51 +0000 Subject: [PATCH 17/17] Bump version to 0.1.5-beta --- directory.build.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/directory.build.props b/directory.build.props index 26f96c94..79ba163d 100644 --- a/directory.build.props +++ b/directory.build.props @@ -1,6 +1,6 @@ - 0.1.4 + 0.1.5 beta - \ No newline at end of file +