Skip to content

chore: add release please #193

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
11 changes: 9 additions & 2 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,21 @@ jobs:
with:
dotnet-version: 8.x

- uses: supabase/setup-cli@v1
with:
version: latest

- name: Start supabase
run: supabase start

- 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: Initialize Testing Stack
# run: docker compose up -d

- name: Test
run: dotnet test --no-restore
21 changes: 18 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
name: Publish NuGet Package
name: Release - Publish NuGet Package

on:
push:
branches:
- release/* # Default release branch
- master

jobs:
release-please:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
issues: write
steps:
- uses: googleapis/release-please-action@v4
with:
target-branch: ${{ github.ref_name }}
manifest-file: .release-please-manifest.json
config-file: release-please-config.json

publish:
needs: release-please
if: ${{ github.repository_owner == 'supabase-community' && startsWith(github.event.head_commit.message, 'chore(master)') && github.ref == 'refs/heads/master' && github.event_name == 'push' }}
name: build, pack & publish
runs-on: ubuntu-latest
steps:
Expand All @@ -24,7 +39,7 @@ jobs:
check-name: build-and-test
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10

- name: Restore dependencies
run: dotnet restore

Expand Down
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "1.1.1"
}
25 changes: 10 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
<p align="center">
<img width="300" src=".github/supabase-csharp.png"/>
</p>
<p align="center">
<img src="https://github.com/supabase/supabase-csharp/workflows/Build%20And%20Test/badge.svg"/>
<a href="https://www.nuget.org/packages/Supabase/">
<img src="https://img.shields.io/nuget/vpre/Supabase"/>
</a>
</p>
# Supabase.Csharp

[![Build and Test](https://github.com/supabase-community/supabase-csharp/actions/workflows/build-and-test.yml/badge.svg)](https://github.com/supabase-community/supabase-csharp/actions/workflows/build-and-test.yml)
[![NuGet](https://img.shields.io/nuget/vpre/Supabase)](https://www.nuget.com/packages/Supabase/)

Documentation can be found [below](#getting-started), on
the [Supabase Developer Documentation](https://supabase.com/docs/reference/csharp/introduction) and additionally in
Expand All @@ -26,15 +21,15 @@ the [Generated API Docs](https://supabase-community.github.io/supabase-csharp/ap
## Features

- [x] Integration with [Supabase.Realtime](https://github.com/supabase-community/realtime-csharp)
- Realtime listeners for database changes
- Realtime listeners for database changes
- [x] Integration with [Postgrest](https://github.com/supabase-community/postgrest-csharp)
- Access your database using a REST API generated from your schema & database functions
- Access your database using a REST API generated from your schema & database functions
- [x] Integration with [Gotrue](https://github.com/supabase-community/gotrue-csharp)
- User authentication, including OAuth, email/password, and native sign-in
- User authentication, including OAuth, email/password, and native sign-in
- [x] Integration with [Supabase Storage](https://github.com/supabase-community/storage-csharp)
- Store files in S3 with additional managed metadata
- Store files in S3 with additional managed metadata
- [x] Integration with [Supabase Edge Functions](https://github.com/supabase-community/functions-csharp)
- Run serverless functions on the edge
- Run serverless functions on the edge
- [x] [Nuget Release](https://www.nuget.org/packages/supabase-csharp)

## Quickstart
Expand Down Expand Up @@ -69,7 +64,7 @@ a public/user account, please do so using a separate client instance for each._
- [Troubleshooting](https://github.com/supabase-community/supabase-csharp/wiki/Troubleshooting)
- [Discussion Forum](https://github.com/supabase-community/supabase-csharp/discussions)

## Package made possible through the efforts of:
## Package made possible through the efforts of

<a href="https://github.com/supabase-community/supabase-csharp/graphs/contributors">
<img src="https://contrib-generator.fly.dev/repo/generate?repo=supabase-community/supabase-csharp,supabase-community/postgrest-csharp,supabase-community/realtime-csharp,supabase-community/gotrue-csharp&size=64&strokeWidth=4&strokeColor=3ecf8e&padding=12"/>
Expand Down
12 changes: 7 additions & 5 deletions Supabase/Supabase.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@
<PackageProjectUrl>https://github.com/supabase-community/supabase-csharp</PackageProjectUrl>
<Summary>A C# implementation of the Supabase client</Summary>
<PackageTags>supabase</PackageTags>
<!-- x-release-please-start-version -->
<ReleaseVersion>1.1.1</ReleaseVersion>
<PackageVersion>1.1.1</PackageVersion>
<!-- x-release-please-end -->
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageIcon>icon.png</PackageIcon>
<PackageReadmeFile>README.md</PackageReadmeFile>
Expand All @@ -32,7 +34,7 @@
</PropertyGroup>

<PropertyGroup Condition=" '$(Version)' == '' ">
<VersionPrefix Condition=" '$(VersionPrefix)' == '' ">1.1.1</VersionPrefix>
<VersionPrefix Condition=" '$(VersionPrefix)' == '' ">1.1.1</VersionPrefix> <!-- x-release-please-version -->
<Version Condition=" '$(Version)' == '' ">$(VersionPrefix)</Version>
</PropertyGroup>
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
Expand All @@ -42,10 +44,10 @@
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<PackageReference Include="Supabase.Core" Version="1.0.0" />
<PackageReference Include="Supabase.Functions" Version="2.0.0" />
<PackageReference Include="Supabase.Functions" Version="2.1.0" />
<PackageReference Include="Supabase.Gotrue" Version="6.0.3" />
<PackageReference Include="Supabase.Postgrest" Version="4.0.3" />
<PackageReference Include="Supabase.Realtime" Version="7.0.2" />
<PackageReference Include="Supabase.Postgrest" Version="4.1.0" />
<PackageReference Include="Supabase.Realtime" Version="7.2.0" />
<PackageReference Include="Supabase.Storage" Version="2.0.2" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>
Expand All @@ -54,4 +56,4 @@
<None Include="..\.github\icon.png" Pack="true" Link="icon.png" PackagePath="\" />
<None Include="..\README.md" Pack="true" Link="README.md" PackagePath="\" />
</ItemGroup>
</Project>
</Project>
6 changes: 3 additions & 3 deletions SupabaseTests/Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ public async Task InitializeTest()
{
_instance = new Supabase.Client("http://localhost", null, new Supabase.SupabaseOptions
{
AuthUrlFormat = "{0}:9999",
RealtimeUrlFormat = "ws://realtime-dev.localhost:4000/socket",
RestUrlFormat = "{0}:3000",
AuthUrlFormat = "{0}:54321/rest/v1",
RealtimeUrlFormat = "ws://127.0.0.1:54321/realtime/v1",
RestUrlFormat = "{0}:54321/rest/v1",
AutoConnectRealtime = false,
});
await _instance.InitializeAsync();
Expand Down
6 changes: 3 additions & 3 deletions SupabaseTests/StatelessClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ public class StatelessClient
private string supabaseUrl = "http://localhost";
private Supabase.SupabaseOptions options = new()
{
AuthUrlFormat = "{0}:9999",
RealtimeUrlFormat = "{0}:4000/socket",
RestUrlFormat = "{0}:3000"
AuthUrlFormat = "{0}:54321/rest/v1",
RealtimeUrlFormat = "ws://127.0.0.1:54321/realtime/v1",
RestUrlFormat = "{0}:54321/rest/v1",
};

[TestMethod("Can access Stateless REST")]
Expand Down
10 changes: 5 additions & 5 deletions SupabaseTests/SupabaseTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
<IsPackable>false</IsPackable>
<ReleaseVersion>0.8.5</ReleaseVersion>
<OutputType>Library</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.5.0" />
<PackageReference Include="MSTest.TestFramework" Version="3.3.1" />
<PackageReference Include="coverlet.collector" Version="6.0.2"><IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageReference Include="MSTest.TestAdapter" Version="3.9.3" />
<PackageReference Include="MSTest.TestFramework" Version="3.9.3" />
<PackageReference Include="coverlet.collector" Version="6.0.4"><IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
Expand Down
16 changes: 16 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"packages": {
".": {
"changelog-path": "CHANGELOG.md",
"bump-minor-pre-major": false,
"bump-patch-for-minor-pre-major": false,
"draft": false,
"prerelease": false,
"release-type": "simple",
"extra-files": [
"Supabase/Supbase.csproj"
]
}
},
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
}
8 changes: 8 additions & 0 deletions supabase/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Supabase
.branches
.temp

# dotenvx
.env.keys
.env.local
.env.*.local
Loading
Loading