diff --git a/.documentation/.gitignore b/.documentation/.gitignore index 2781f6d5..8846862a 100644 --- a/.documentation/.gitignore +++ b/.documentation/.gitignore @@ -6,4 +6,5 @@ /**/packages/ /**/bin/ /**/obj/ -_site +/_site +/api diff --git a/.documentation/api/.gitignore b/.documentation/api/.gitignore deleted file mode 100644 index f798527e..00000000 --- a/.documentation/api/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -############### -# temp file # -############### -*.yml -.manifest diff --git a/.documentation/api/index.md b/.documentation/api/index.md deleted file mode 100644 index 1cb68311..00000000 --- a/.documentation/api/index.md +++ /dev/null @@ -1,2 +0,0 @@ -# PLACEHOLDER -TODO: Add .NET projects to the *src* folder and run `docfx` to generate **REAL** *API Documentation*! diff --git a/.documentation/articles/intro.md b/.documentation/articles/intro.md deleted file mode 100644 index 901a16a4..00000000 --- a/.documentation/articles/intro.md +++ /dev/null @@ -1 +0,0 @@ -# Add your introductions here! diff --git a/.documentation/articles/toc.yml b/.documentation/articles/toc.yml deleted file mode 100644 index f64352ce..00000000 --- a/.documentation/articles/toc.yml +++ /dev/null @@ -1,2 +0,0 @@ -- name: Introduction - href: intro.md diff --git a/.documentation/docfx.json b/.documentation/docfx.json index bc47ed33..097635df 100644 --- a/.documentation/docfx.json +++ b/.documentation/docfx.json @@ -3,81 +3,59 @@ { "src": [ { - "files": "Supabase.csproj", - "exclude": [ - "**/bin/**", - "**/obj/**" - ], - "src": "../Supabase" + "src": "../Supabase", + "files": [ + "**/*.csproj" + ] }, { - "files": "Gotrue.csproj", - "exclude": [ - "**/bin/**", - "**/obj/**" - ], - "src": "../modules/gotrue-csharp/Gotrue" + "src": "../modules/gotrue-csharp/Gotrue", + "files": [ + "**/*.csproj" + ] }, { - "files": "Realtime.csproj", - "exclude": [ - "**/bin/**", - "**/obj/**" - ], - "src": "../modules/realtime-csharp/Realtime" + "src": "../modules/realtime-csharp/Realtime", + "files": [ + "**/*.csproj" + ] }, { - "files": "Postgrest.csproj", - "exclude": [ - "**/bin/**", - "**/obj/**" - ], - "src": "../modules/postgrest-csharp/Postgrest" + "src": "../modules/postgrest-csharp/Postgrest", + "files": [ + "**/*.csproj" + ] }, { - "files": "Storage.csproj", - "exclude": [ - "**/bin/**", - "**/obj/**" - ], - "src": "../modules/storage-csharp/Storage" + "src": "../modules/storage-csharp/Storage", + "files": [ + "**/*.csproj" + ] }, { - "files": "Functions.csproj", - "exclude": [ - "**/bin/**", - "**/obj/**" - ], - "src": "../modules/functions-csharp/Functions" + "src": "../modules/functions-csharp/Functions", + "files": [ + "**/*.csproj" + ] }, { - "files": "Core.csproj", - "exclude": [ - "**/bin/**", - "**/obj/**" - ], - "src": "../modules/core-csharp/Core" + "src": "../modules/core-csharp/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/**" ] } ], @@ -88,28 +66,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": "supabase-csharp", + "_appTitle": "supabase-csharp", + "_enableSearch": true + } } -} +} \ No newline at end of file diff --git a/.documentation/index.md b/.documentation/index.md index 95887de5..b4fd5182 100644 --- a/.documentation/index.md +++ b/.documentation/index.md @@ -1,4 +1,5 @@ -# This is the **HOMEPAGE**. -Refer to [Markdown](http://daringfireball.net/projects/markdown/) for how to write markdown files. -## Quick Start Notes: -1. Add images to the *images* folder if the file is referencing an image. +--- +_layout: landing +--- + +# supabase-csharp diff --git a/.documentation/toc.yml b/.documentation/toc.yml index c06f5abf..74604a93 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-and-test.yml b/.github/workflows/build-and-test.yml new file mode 100644 index 00000000..8081215a --- /dev/null +++ b/.github/workflows/build-and-test.yml @@ -0,0 +1,37 @@ +name: Build and Test + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + build-and-test: + runs-on: ubuntu-latest + + env: + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_BUCKET: ${{ secrets.AWS_BUCKET }} + AWS_REGION: ${{ secrets.AWS_REGION }} + + steps: + - uses: actions/checkout@v3 + + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: 8.x + + - name: Restore dependencies + run: dotnet restore + + - name: Build + run: dotnet build --configuration Release --no-restore + + - name: Initialize Testing Stack + run: docker-compose up -d + + - name: Test + run: dotnet test --no-restore diff --git a/.github/workflows/build-documentation.yaml b/.github/workflows/build-documentation.yaml index 7c564a10..c4154293 100644 --- a/.github/workflows/build-documentation.yaml +++ b/.github/workflows/build-documentation.yaml @@ -10,20 +10,24 @@ jobs: docs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: "true" 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 }} diff --git a/.github/workflows/dotnet-core.yml b/.github/workflows/dotnet-core.yml deleted file mode 100644 index fd16fd1c..00000000 --- a/.github/workflows/dotnet-core.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Build And Test - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - buildAndTest: - runs-on: ubuntu-latest - - env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_BUCKET: ${{ secrets.AWS_BUCKET }} - AWS_REGION: ${{ secrets.AWS_REGION }} - - steps: - - uses: actions/checkout@v2 - - - name: Setup .NET Core - uses: actions/setup-dotnet@v1 - with: - dotnet-version: '7.0.x' - - - name: Install dependencies - run: dotnet restore - - - name: Initialize Testing Stack - run: docker-compose up -d - - - name: Build - run: dotnet build --configuration Release --no-restore - - - name: Test - run: dotnet test --no-restore diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8adfe3e6..28f20ba4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,34 +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.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: Generate package + run: dotnet pack ./Supabase/Supabase.csproj --configuration Release - - name: Build Realtime - run: dotnet build ./Supabase/Supabase.csproj --configuration Release --no-restore - - # Publish - - name: publish on version change - run: nuget push "**/*.nupkg" -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}} \ No newline at end of file + - name: Publish on version change + run: dotnet nuget push "**/*.nupkg" --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }}