Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub Actions workflow #219

Merged
merged 17 commits into from
Mar 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/dotnetcore.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build, test and publish

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

env:
config: Release

jobs:
build-test-publish:
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:
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 /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

- name: Publish to GitHub Packages
if: github.ref == 'refs/heads/master'
run: dotnet nuget push *.nupkg
3 changes: 2 additions & 1 deletion Octokit.GraphQL.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<version>0.1.4-beta</version>
<authors>GitHub</authors>
<owners>GitHub</owners>
<repository type="git" url="https://github.com/octokit/octokit.graphql.net" />
<licenseUrl>https://github.com/grokys/octokit.graphql/blob/master/LICENSE.txt</licenseUrl>
<projectUrl>https://github.com/grokys/octokit.graphql</projectUrl>
<iconUrl>https://f.cloud.github.com/assets/19977/1441274/160fba8c-41a9-11e3-831d-61d88fa886f4.png</iconUrl>
Expand All @@ -22,4 +23,4 @@
<file src="Octokit.GraphQL\bin\Release\netstandard1.1\Octokit.GraphQL.Core.dll" target="lib\netstandard1.1"/>
<file src="Octokit.GraphQL\bin\Release\netstandard1.1\Octokit.GraphQL.Core.xml" target="lib\netstandard1.1"/>
</files>
</package>
</package>
4 changes: 2 additions & 2 deletions directory.build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<Version>0.1.4</Version>
<Version>0.1.5</Version>
<VersionSuffix>beta</VersionSuffix>
</PropertyGroup>
</Project>
</Project>