Skip to content

Commit 1f6afe6

Browse files
authored
Update workflows (#132)
* Update documentation workflow * Update build and test workflow * Update release workflow
1 parent f98f80b commit 1f6afe6

File tree

12 files changed

+112
-156
lines changed

12 files changed

+112
-156
lines changed

.documentation/.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@
66
/**/packages/
77
/**/bin/
88
/**/obj/
9-
_site
9+
/_site
10+
/api

.documentation/api/.gitignore

-5
This file was deleted.

.documentation/api/index.md

-2
This file was deleted.

.documentation/articles/intro.md

-1
This file was deleted.

.documentation/articles/toc.yml

-2
This file was deleted.

.documentation/docfx.json

+42-77
Original file line numberDiff line numberDiff line change
@@ -3,81 +3,59 @@
33
{
44
"src": [
55
{
6-
"files": "Supabase.csproj",
7-
"exclude": [
8-
"**/bin/**",
9-
"**/obj/**"
10-
],
11-
"src": "../Supabase"
6+
"src": "../Supabase",
7+
"files": [
8+
"**/*.csproj"
9+
]
1210
},
1311
{
14-
"files": "Gotrue.csproj",
15-
"exclude": [
16-
"**/bin/**",
17-
"**/obj/**"
18-
],
19-
"src": "../modules/gotrue-csharp/Gotrue"
12+
"src": "../modules/gotrue-csharp/Gotrue",
13+
"files": [
14+
"**/*.csproj"
15+
]
2016
},
2117
{
22-
"files": "Realtime.csproj",
23-
"exclude": [
24-
"**/bin/**",
25-
"**/obj/**"
26-
],
27-
"src": "../modules/realtime-csharp/Realtime"
18+
"src": "../modules/realtime-csharp/Realtime",
19+
"files": [
20+
"**/*.csproj"
21+
]
2822
},
2923
{
30-
"files": "Postgrest.csproj",
31-
"exclude": [
32-
"**/bin/**",
33-
"**/obj/**"
34-
],
35-
"src": "../modules/postgrest-csharp/Postgrest"
24+
"src": "../modules/postgrest-csharp/Postgrest",
25+
"files": [
26+
"**/*.csproj"
27+
]
3628
},
3729
{
38-
"files": "Storage.csproj",
39-
"exclude": [
40-
"**/bin/**",
41-
"**/obj/**"
42-
],
43-
"src": "../modules/storage-csharp/Storage"
30+
"src": "../modules/storage-csharp/Storage",
31+
"files": [
32+
"**/*.csproj"
33+
]
4434
},
4535
{
46-
"files": "Functions.csproj",
47-
"exclude": [
48-
"**/bin/**",
49-
"**/obj/**"
50-
],
51-
"src": "../modules/functions-csharp/Functions"
36+
"src": "../modules/functions-csharp/Functions",
37+
"files": [
38+
"**/*.csproj"
39+
]
5240
},
5341
{
54-
"files": "Core.csproj",
55-
"exclude": [
56-
"**/bin/**",
57-
"**/obj/**"
58-
],
59-
"src": "../modules/core-csharp/Core"
42+
"src": "../modules/core-csharp/Core",
43+
"files": [
44+
"**/*.csproj"
45+
]
6046
}
6147
],
62-
"dest": "api",
63-
"disableGitFeatures": false,
64-
"disableDefaultFilter": false
48+
"dest": "api"
6549
}
6650
],
6751
"build": {
6852
"content": [
6953
{
7054
"files": [
71-
"api/**.yml",
72-
"api/index.md"
73-
]
74-
},
75-
{
76-
"files": [
77-
"articles/**.md",
78-
"articles/**/toc.yml",
79-
"toc.yml",
80-
"*.md"
55+
"**/*.{md,yml}"
56+
],
57+
"exclude": [
58+
"_site/**"
8159
]
8260
}
8361
],
@@ -88,28 +66,15 @@
8866
]
8967
}
9068
],
91-
"overwrite": [
92-
{
93-
"files": [
94-
"apidoc/**.md"
95-
],
96-
"exclude": [
97-
"obj/**",
98-
"_site/**"
99-
]
100-
}
101-
],
102-
"dest": "_site",
103-
"globalMetadataFiles": [],
104-
"fileMetadataFiles": [],
69+
"output": "_site",
10570
"template": [
106-
"default"
71+
"default",
72+
"modern"
10773
],
108-
"postProcessors": [],
109-
"markdownEngineName": "markdig",
110-
"noLangKeyword": false,
111-
"keepFileLink": false,
112-
"cleanupCacheHistory": false,
113-
"disableGitFeatures": false
74+
"globalMetadata": {
75+
"_appName": "supabase-csharp",
76+
"_appTitle": "supabase-csharp",
77+
"_enableSearch": true
78+
}
11479
}
115-
}
80+
}

.documentation/index.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# This is the **HOMEPAGE**.
2-
Refer to [Markdown](http://daringfireball.net/projects/markdown/) for how to write markdown files.
3-
## Quick Start Notes:
4-
1. Add images to the *images* folder if the file is referencing an image.
1+
---
2+
_layout: landing
3+
---
4+
5+
# supabase-csharp

.documentation/toc.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
1-
- name: Articles
2-
href: articles/
3-
- name: Api Documentation
1+
- name: API
42
href: api/
5-
homepage: api/index.md

.github/workflows/build-and-test.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Build and Test
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
build-and-test:
11+
runs-on: ubuntu-latest
12+
13+
env:
14+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
15+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
16+
AWS_BUCKET: ${{ secrets.AWS_BUCKET }}
17+
AWS_REGION: ${{ secrets.AWS_REGION }}
18+
19+
steps:
20+
- uses: actions/checkout@v3
21+
22+
- name: Setup .NET
23+
uses: actions/setup-dotnet@v3
24+
with:
25+
dotnet-version: 8.x
26+
27+
- name: Restore dependencies
28+
run: dotnet restore
29+
30+
- name: Build
31+
run: dotnet build --configuration Release --no-restore
32+
33+
- name: Initialize Testing Stack
34+
run: docker-compose up -d
35+
36+
- name: Test
37+
run: dotnet test --no-restore

.github/workflows/build-documentation.yaml

+13-9
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,24 @@ jobs:
1010
docs:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v3
1414
with:
1515
submodules: "true"
1616
persist-credentials: false
1717

18-
- uses: nikeee/[email protected]
19-
name: Build Documentation
18+
- name: Setup .NET
19+
uses: actions/setup-dotnet@v3
2020
with:
21-
args: .documentation/docfx.json
21+
dotnet-version: 8.x
22+
23+
- name: Install docfx
24+
run: dotnet tool update -g docfx
25+
26+
- name: Build documentation
27+
run: docfx .documentation/docfx.json
2228

2329
- name: Deploy 🚀
24-
uses: JamesIves/github-pages-deploy-action@3.7.1
30+
uses: JamesIves/github-pages-deploy-action@v4
2531
with:
26-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27-
BRANCH: gh-pages
28-
FOLDER: .documentation/_site # The folder the action should deploy.
29-
CLEAN: true # Automatically remove deleted files from the deploy branch
32+
folder: .documentation/_site
33+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/dotnet-core.yml

-37
This file was deleted.

.github/workflows/release.yml

+12-14
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,32 @@
1-
name: Publish Nuget Package
1+
name: Publish NuGet Package
2+
23
on:
34
push:
45
branches:
56
- release/* # Default release branch
7+
68
jobs:
79
publish:
810
name: build, pack & publish
911
runs-on: ubuntu-latest
1012
steps:
11-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v3
1214

13-
- name: Setup .NET Core
14-
uses: actions/setup-dotnet@v1
15+
- name: Setup .NET
16+
uses: actions/setup-dotnet@v3
1517
with:
16-
dotnet-version: '7.0.x'
18+
dotnet-version: 8.x
1719

1820
- name: Wait for tests to succeed
1921
uses: lewagon/[email protected]
2022
with:
2123
ref: ${{ github.ref }}
22-
check-name: 'buildAndTest'
24+
check-name: build-and-test
2325
repo-token: ${{ secrets.GITHUB_TOKEN }}
2426
wait-interval: 10
2527

26-
- name: Install dependencies
27-
run: dotnet restore
28+
- name: Generate package
29+
run: dotnet pack ./Supabase/Supabase.csproj --configuration Release
2830

29-
- name: Build Realtime
30-
run: dotnet build ./Supabase/Supabase.csproj --configuration Release --no-restore
31-
32-
# Publish
33-
- name: publish on version change
34-
run: nuget push "**/*.nupkg" -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}}
31+
- name: Publish on version change
32+
run: dotnet nuget push "**/*.nupkg" --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }}

0 commit comments

Comments
 (0)