Skip to content

Commit 5f00b2b

Browse files
committed
chore: add release-please
1 parent bd94638 commit 5f00b2b

File tree

5 files changed

+55
-6
lines changed

5 files changed

+55
-6
lines changed

.github/workflows/release-please.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
- release/*
6+
7+
permissions:
8+
contents: write
9+
pull-requests: write
10+
11+
name: release-please
12+
13+
jobs:
14+
release-please:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: googleapis/release-please-action@v4
18+
with:
19+
target-branch: ${{ github.ref_name }}
20+
manifest-file: .release-please-manifest.json
21+
config-file: release-please-config.json

.github/workflows/release.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
name: Publish NuGet Package
22

33
on:
4-
push:
5-
branches:
6-
- release/* # Default release branch
4+
workflow_run:
5+
workflows: ["release-please"]
6+
branches: [master]
7+
types:
8+
- completed
9+
10+
# push:
11+
# branches:
12+
# - release/* # Default release branch
713

814
jobs:
915
publish:
16+
if: ${{ startsWith(github.event.head_commit.message, 'chore(main)') && github.ref == 'refs/heads/main' && github.event_name == 'push' && github.repository_owner == 'supabase' && github.event.workflow_run.conclusion == 'success' }}
1017
name: build, pack & publish
1118
runs-on: ubuntu-latest
1219
steps:
@@ -24,7 +31,7 @@ jobs:
2431
check-name: build-and-test
2532
repo-token: ${{ secrets.GITHUB_TOKEN }}
2633
wait-interval: 10
27-
34+
2835
- name: Restore dependencies
2936
run: dotnet restore
3037

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "2.0.0"
3+
}

Functions/Functions.csproj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@
1616
<PackageIconUrl>https://avatars.githubusercontent.com/u/54469796?s=200&amp;v=4</PackageIconUrl>
1717
<PackageProjectUrl>https://github.com/supabase-community/functions-csharp</PackageProjectUrl>
1818
<PackageTags>supabase, functions</PackageTags>
19+
<!-- x-release-please-start-version -->
1920
<PackageVersion>2.0.0</PackageVersion>
2021
<ReleaseVersion>2.0.0</ReleaseVersion>
22+
<!-- x-release-please-end -->
2123
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
2224
<PackageIcon>icon.png</PackageIcon>
2325
<PackageReadmeFile>README.md</PackageReadmeFile>
@@ -31,7 +33,7 @@
3133
</PropertyGroup>
3234

3335
<PropertyGroup Condition=" '$(Version)' == '' ">
34-
<VersionPrefix Condition=" '$(VersionPrefix)' == '' ">2.0.0</VersionPrefix>
36+
<VersionPrefix Condition=" '$(VersionPrefix)' == '' ">2.0.0</VersionPrefix> <!-- x-release-please-version -->
3537
<VersionSuffix Condition=" '$(VersionSuffix)' == '' "></VersionSuffix>
3638
<Version Condition=" '$(VersionSuffix)' != '' ">$(VersionPrefix)-$(VersionSuffix)</Version>
3739
<Version Condition=" '$(Version)' == '' ">$(VersionPrefix)</Version>
@@ -46,4 +48,4 @@
4648
<None Include="..\.github\icon.png" Pack="true" Link="icon.png" PackagePath="\" />
4749
<None Include="..\README.md" Pack="true" Link="README.md" PackagePath="\" />
4850
</ItemGroup>
49-
</Project>
51+
</Project>

release-please-config.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"packages": {
3+
".": {
4+
"changelog-path": "CHANGELOG.md",
5+
"bump-minor-pre-major": false,
6+
"bump-patch-for-minor-pre-major": false,
7+
"draft": false,
8+
"prerelease": false,
9+
"release-type": "simple",
10+
"extra-files": [
11+
"Functions/Functions.csproj"
12+
]
13+
}
14+
},
15+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
16+
}

0 commit comments

Comments
 (0)