Fix GraphQL entity names in subqueries (#299) #213
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build, test and publish | |
"on": | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
env: | |
config: Release | |
PackageOutputPath: nupkg | |
jobs: | |
build-test-publish: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- 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: | |
nuget-version: 5.x | |
- name: Build using .NET Core | |
run: dotnet build Octokit.GraphQL.sln -c ${{ env.config }} | |
- name: Run Octokit.GraphQL.UnitTests | |
run: >- | |
dotnet test -c ${{ env.config }} --no-build | |
.\Octokit.GraphQL.UnitTests\Octokit.GraphQL.UnitTests.csproj | |
- name: Run Octokit.GraphQL.Core.UnitTests | |
run: >- | |
dotnet test -c ${{ env.config }} --no-build | |
.\Octokit.GraphQL.Core.UnitTests\Octokit.GraphQL.Core.UnitTests.csproj | |
- name: Run Octokit.GraphQL.Core.Generation.UnitTests | |
run: >- | |
dotnet test -c ${{ env.config }} --no-build | |
.\Octokit.GraphQL.Core.Generation.UnitTests\Octokit.GraphQL.Core.Generation.UnitTests.csproj | |
- name: Create package using .nuspec | |
run: >- | |
dotnet pack Octokit.GraphQL.Pack/Octokit.GraphQL.Pack.csproj --output | |
${{ env.PackageOutputPath }} | |
- name: Upload nupkg artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: nupkg | |
path: ${{ env.PackageOutputPath }}/*.nupkg | |
- name: Publish to GitHub Packages | |
if: github.ref == 'refs/heads/main' | |
shell: bash | |
run: dotnet nuget push ${{ env.PackageOutputPath }}/*.nupkg | |
- name: Publish to nuget.org | |
if: github.ref == 'refs/heads/main' | |
shell: bash | |
run: >- | |
dotnet nuget push ${{ env.PackageOutputPath }}/*.nupkg --source | |
nuget.org -k ${{ secrets.NUGET_TOKEN }} |