Skip to content
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
28 changes: 18 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net

name: Build

on:
Expand All @@ -9,22 +6,33 @@ on:
pull_request:
branches: [ "main" ]

env:
DOTNET_NOLOGO: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Restore dependencies
run: dotnet restore
dotnet-version: 10.0.x
cache: true
cache-dependency-path: '**/packages.lock.json'

- name: Restore
run: dotnet restore Linq2GraphQL.CI.slnf --locked-mode

- name: Build
run: dotnet build --no-restore
run: dotnet build Linq2GraphQL.CI.slnf --no-restore

- name: Test
run: dotnet test --no-build --verbosity normal
run: dotnet test Linq2GraphQL.CI.slnf --no-build --verbosity normal
17 changes: 12 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,32 @@ on:
branches:
- main

env:
DOTNET_NOLOGO: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup .NET Core
uses: actions/setup-dotnet@v3
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
dotnet-version: 10.0.x
cache: true
cache-dependency-path: '**/packages.lock.json'

- name: Publish
working-directory: docs/Linq2GraphQL.Docs
run: dotnet publish -c:Release -o:publish

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/Linq2GraphQL.Docs/publish/wwwroot
Expand Down
56 changes: 24 additions & 32 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,63 +1,55 @@
name: Create Release

on: [ workflow_dispatch ]

env:
DOTNET_NOLOGO: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1

permissions:
contents: write

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Nerdbank.GitVersioning
uses: dotnet/nbgv@v0.4.0

- name: Setup .NET
uses: actions/setup-dotnet@v2
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
dotnet-version: 10.0.x
cache: true
cache-dependency-path: '**/packages.lock.json'

- uses: dotnet/nbgv@master
id: nbgv
- run: echo 'SemVer2=${{ steps.nbgv.outputs.SemVer2 }}'

- name: Pack Linq2GraphQL.Client
working-directory: src/Linq2GraphQL.Client
run: dotnet pack -c Release

- name: Push Linq2GraphQL.Client
working-directory: src/Linq2GraphQL.Client/bin/Release
run: dotnet nuget push *.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }}

- name: Pack Linq2GraphQL.Client.Subscriptions
working-directory: src/Linq2GraphQL.Client.Subscriptions
run: dotnet pack -c Release

- name: Push Linq2GraphQL.Client.Subscriptions
working-directory: src/Linq2GraphQL.Client.Subscriptions/bin/Release
run: dotnet nuget push *.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }}
- name: Restore
run: dotnet restore Linq2GraphQL.Release.slnf --locked-mode

- name: Pack Linq2GraphQL.Generator
working-directory: src/Linq2GraphQL.Generator
run: dotnet pack -c Release
- name: Pack
run: dotnet pack Linq2GraphQL.Release.slnf -c Release --no-restore -o artifacts

- name: Push Linq2GraphQL.Generator
working-directory: src/Linq2GraphQL.Generator/bin/Release
run: dotnet nuget push *.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }}
- name: Push to NuGet
run: dotnet nuget push artifacts/*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }} --skip-duplicate

- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch

- name: Create Release
uses: actions/create-release@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.nbgv.outputs.SemVer2 }}
release_name: Release ${{ steps.nbgv.outputs.SemVer2 }}
name: Release ${{ steps.nbgv.outputs.SemVer2 }}
draft: false
prerelease: ${{ !startsWith(steps.extract_branch.outputs.branch, 'release/') }}
prerelease: ${{ !startsWith(steps.extract_branch.outputs.branch, 'release/') }}
files: artifacts/*.nupkg
5 changes: 5 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Project>
<PropertyGroup>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
</PropertyGroup>
</Project>
33 changes: 16 additions & 17 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,27 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageVersion>
<PackageVersion Include="HotChocolate.AspNetCore" Version="15.1.11" />
<PackageVersion Include="HotChocolate.Data" Version="15.1.11" />
<PackageVersion Include="HotChocolate.Types.Scalars" Version="15.1.11" />
<PackageVersion Include="HotChocolate.Types.Analyzers" Version="15.1.11" />
<PackageVersion Include="HotChocolate.AspNetCore" Version="15.1.17" />
<PackageVersion Include="HotChocolate.Data" Version="15.1.17" />
<PackageVersion Include="HotChocolate.Types.Scalars" Version="15.1.17" />
<PackageVersion Include="HotChocolate.Types.Analyzers" Version="15.1.17" />
<PackageVersion Include="Macross.Json.Extensions" Version="3.0.0" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.9" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="9.0.9" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="9.0.9" />
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="9.0.9" />
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="9.0.9" />
<PackageVersion Include="Microsoft.Extensions.Configuration.FileExtensions" Version="9.0.9" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="9.0.9" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="9.0.9" />
<PackageVersion Include="Microsoft.Extensions.Http" Version="9.0.9" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="9.0.9" />
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="9.0.9" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly" Version="10.0.11" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="10.0.11" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.0.11" />
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="10.0.11" />
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="10.0.11" />
<PackageVersion Include="Microsoft.Extensions.Configuration.FileExtensions" Version="10.0.11" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="10.0.11" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="10.0.11" />
<PackageVersion Include="Microsoft.Extensions.Http" Version="10.0.11" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="10.0.11" />
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="10.0.11" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageVersion Include="Moq" Version="4.20.72" />
<PackageVersion Include="Shouldly" Version="4.3.0" />
<PackageVersion Include="System.CodeDom" Version="9.0.9" />
<PackageVersion Include="System.CodeDom" Version="10.0.11" />
<PackageVersion Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
<PackageVersion Include="System.Text.Json" Version="9.0.9" />
<PackageVersion Include="TabBlazor" Version="0.8.1.1-alpha" />
<PackageVersion Include="Websocket.Client" Version="5.3.0" />
<PackageVersion Include="xunit" Version="2.9.3" />
Expand Down
17 changes: 17 additions & 0 deletions Linq2GraphQL.CI.slnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"solution": {
"path": "Linq2GraphQL.sln",
"projects": [
"src\\Linq2GraphQL.Client\\Linq2GraphQL.Client.csproj",
"src\\Linq2GraphQL.Client.Subscriptions\\Linq2GraphQL.Client.Subscriptions.csproj",
"src\\Linq2GraphQL.Generator\\Linq2GraphQL.Generator.csproj",
"test\\Linq2GraphQL.Console\\Linq2GraphQL.Console.csproj",
"test\\Linq2GraphQL.TestClient\\Linq2GraphQL.TestClient.csproj",
"test\\Linq2GraphQL.TestClientNullable\\Linq2GraphQL.TestClientNullable.csproj",
"test\\Linq2GraphQL.TestServer\\Linq2GraphQL.TestServer.csproj",
"test\\Linq2GraphQL.TestServer.Shared\\Linq2GraphQL.TestServer.Shared.csproj",
"test\\Linq2GraphQL.TestServerNullable\\Linq2GraphQL.TestServerNullable.csproj",
"test\\Linq2GraphQL.Tests\\Linq2GraphQL.Tests.csproj"
]
}
}
10 changes: 10 additions & 0 deletions Linq2GraphQL.Release.slnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"solution": {
"path": "Linq2GraphQL.sln",
"projects": [
"src\\Linq2GraphQL.Client\\Linq2GraphQL.Client.csproj",
"src\\Linq2GraphQL.Client.Subscriptions\\Linq2GraphQL.Client.Subscriptions.csproj",
"src\\Linq2GraphQL.Generator\\Linq2GraphQL.Generator.csproj"
]
}
}
2 changes: 1 addition & 1 deletion StartGG/StartGG.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>disable</Nullable>
</PropertyGroup>
Expand Down
Loading
Loading