From e838a120acd76392c97b3674a2d2ca2b68f20d73 Mon Sep 17 00:00:00 2001 From: FantasyTeddy Date: Wed, 3 Jan 2024 18:16:06 +0100 Subject: [PATCH 1/3] Update documentation workflow --- .documentation/.gitignore | 3 +- .documentation/api/index.md | 1 - .documentation/api/toc.yml | 37 -------------- .documentation/docfx.json | 57 +++++++--------------- .documentation/index.md | 4 ++ .documentation/toc.yml | 5 +- .github/workflows/build-documentation.yaml | 22 +++++---- 7 files changed, 37 insertions(+), 92 deletions(-) delete mode 100644 .documentation/api/index.md delete mode 100644 .documentation/api/toc.yml diff --git a/.documentation/.gitignore b/.documentation/.gitignore index 4378419..725472c 100644 --- a/.documentation/.gitignore +++ b/.documentation/.gitignore @@ -6,4 +6,5 @@ /**/packages/ /**/bin/ /**/obj/ -_site +/_site +/api diff --git a/.documentation/api/index.md b/.documentation/api/index.md deleted file mode 100644 index 160c0f3..0000000 --- a/.documentation/api/index.md +++ /dev/null @@ -1 +0,0 @@ -# core-csharp diff --git a/.documentation/api/toc.yml b/.documentation/api/toc.yml deleted file mode 100644 index f055141..0000000 --- a/.documentation/api/toc.yml +++ /dev/null @@ -1,37 +0,0 @@ -### YamlMime:TableOfContent -- uid: Supabase.Gotrue - name: Supabase.Gotrue - items: - - uid: Supabase.Gotrue.Api - name: Api - - uid: Supabase.Gotrue.Client - name: Client - - uid: Supabase.Gotrue.Client.AuthState - name: Client.AuthState - - uid: Supabase.Gotrue.Client.Provider - name: Client.Provider - - uid: Supabase.Gotrue.ClientOptions - name: ClientOptions - - uid: Supabase.Gotrue.ClientStateChanged - name: ClientStateChanged - - uid: Supabase.Gotrue.Constants - name: Constants - - uid: Supabase.Gotrue.ExistingUserException - name: ExistingUserException - - uid: Supabase.Gotrue.InvalidEmailOrPasswordException - name: InvalidEmailOrPasswordException - - uid: Supabase.Gotrue.RequestException - name: RequestException - - uid: Supabase.Gotrue.Session - name: Session - - uid: Supabase.Gotrue.User - name: User - - uid: Supabase.Gotrue.UserAttributes - name: UserAttributes -- uid: Supabase.Gotrue.Responses - name: Supabase.Gotrue.Responses - items: - - uid: Supabase.Gotrue.Responses.BaseResponse - name: BaseResponse - - uid: Supabase.Gotrue.Responses.ErrorResponse - name: ErrorResponse diff --git a/.documentation/docfx.json b/.documentation/docfx.json index 02857dd..456e377 100644 --- a/.documentation/docfx.json +++ b/.documentation/docfx.json @@ -3,33 +3,23 @@ { "src": [ { - "files": "Core.csproj", - "exclude": [ - "**/bin/**", - "**/obj/**" - ], - "src": "../Core" + "src": "../Core", + "files": [ + "**/*.csproj" + ] } ], - "dest": "api", - "disableGitFeatures": false, - "disableDefaultFilter": false + "dest": "api" } ], "build": { "content": [ { "files": [ - "api/**.yml", - "api/index.md" - ] - }, - { - "files": [ - "articles/**.md", - "articles/**/toc.yml", - "toc.yml", - "*.md" + "**/*.{md,yml}" + ], + "exclude": [ + "_site/**" ] } ], @@ -40,28 +30,15 @@ ] } ], - "overwrite": [ - { - "files": [ - "apidoc/**.md" - ], - "exclude": [ - "obj/**", - "_site/**" - ] - } - ], - "dest": "_site", - "globalMetadataFiles": [], - "fileMetadataFiles": [], + "output": "_site", "template": [ - "default" + "default", + "modern" ], - "postProcessors": [], - "markdownEngineName": "markdig", - "noLangKeyword": false, - "keepFileLink": false, - "cleanupCacheHistory": false, - "disableGitFeatures": false + "globalMetadata": { + "_appName": "core-csharp", + "_appTitle": "core-csharp", + "_enableSearch": true + } } } \ No newline at end of file diff --git a/.documentation/index.md b/.documentation/index.md index 160c0f3..32b89eb 100644 --- a/.documentation/index.md +++ b/.documentation/index.md @@ -1 +1,5 @@ +--- +_layout: landing +--- + # core-csharp diff --git a/.documentation/toc.yml b/.documentation/toc.yml index 59f8010..1a5e7a2 100644 --- a/.documentation/toc.yml +++ b/.documentation/toc.yml @@ -1,5 +1,2 @@ -- name: Articles - href: articles/ -- name: Api Documentation +- name: API href: api/ - homepage: api/index.md diff --git a/.github/workflows/build-documentation.yaml b/.github/workflows/build-documentation.yaml index c5e4b2e..0460eba 100644 --- a/.github/workflows/build-documentation.yaml +++ b/.github/workflows/build-documentation.yaml @@ -10,19 +10,23 @@ jobs: docs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: persist-credentials: false - - uses: nikeee/docfx-action@v1.0.0 - name: Build Documentation + - name: Setup .NET + uses: actions/setup-dotnet@v3 with: - args: .documentation/docfx.json + dotnet-version: 8.x + + - name: Install docfx + run: dotnet tool update -g docfx + + - name: Build documentation + run: docfx .documentation/docfx.json - name: Deploy 🚀 - uses: JamesIves/github-pages-deploy-action@3.7.1 + uses: JamesIves/github-pages-deploy-action@v4 with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - BRANCH: gh-pages - FOLDER: .documentation/_site # The folder the action should deploy. - CLEAN: true # Automatically remove deleted files from the deploy branch + folder: .documentation/_site + token: ${{ secrets.GITHUB_TOKEN }} From f25608e7b5a428004936d33c4220f14906e8dbf0 Mon Sep 17 00:00:00 2001 From: FantasyTeddy Date: Wed, 3 Jan 2024 18:19:48 +0100 Subject: [PATCH 2/3] Update build and test workflow --- .../{dotnet-core.yml => build-and-test.yml} | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) rename .github/workflows/{dotnet-core.yml => build-and-test.yml} (51%) diff --git a/.github/workflows/dotnet-core.yml b/.github/workflows/build-and-test.yml similarity index 51% rename from .github/workflows/dotnet-core.yml rename to .github/workflows/build-and-test.yml index 0627456..c10de7f 100644 --- a/.github/workflows/dotnet-core.yml +++ b/.github/workflows/build-and-test.yml @@ -1,25 +1,23 @@ -name: Build And Test +name: Build and Test on: push: branches: [master] pull_request: branches: [master] - workflow_dispatch: jobs: - buildAndTest: + build-and-test: runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Setup .NET Core - uses: actions/setup-dotnet@v1 + - name: Setup .NET + uses: actions/setup-dotnet@v3 with: - dotnet-version: '7.0.x' + dotnet-version: 8.x - - name: Install dependencies + - name: Restore dependencies run: dotnet restore - name: Build From 76b51215a6f3086b1d4776f994af5d2efd85b50c Mon Sep 17 00:00:00 2001 From: FantasyTeddy Date: Wed, 3 Jan 2024 18:22:55 +0100 Subject: [PATCH 3/3] Update release workflow --- .github/workflows/release.yml | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1acc0b3..fe65180 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,35 +1,32 @@ -name: Publish Nuget Package +name: Publish NuGet Package + on: push: branches: - release/* # Default release branch + jobs: publish: name: build, pack & publish runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Setup .NET Core - uses: actions/setup-dotnet@v1 + - name: Setup .NET + uses: actions/setup-dotnet@v3 with: - dotnet-version: '7.0.x' + dotnet-version: 8.x - name: Wait for tests to succeed - uses: lewagon/wait-on-check-action@v1.0.0 + uses: lewagon/wait-on-check-action@v1.3.1 with: ref: ${{ github.ref }} - check-name: "buildAndTest" + check-name: build-and-test repo-token: ${{ secrets.GITHUB_TOKEN }} wait-interval: 10 - - name: Install dependencies - run: dotnet restore - - - name: Build Core - run: dotnet build ./Core/Core.csproj --configuration Release --no-restore + - name: Generate package + run: dotnet pack ./Core/Core.csproj --configuration Release - # Publish - - name: publish on version change - run: nuget push "**/*.nupkg" -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}} - + - name: Publish on version change + run: dotnet nuget push "**/*.nupkg" --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }}