Skip to content

Commit e8522ca

Browse files
committed
chore: automate release with release-please
1 parent 677d64a commit e8522ca

File tree

4 files changed

+39
-3
lines changed

4 files changed

+39
-3
lines changed

.github/workflows/release.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,27 @@
1-
name: Publish NuGet Package
1+
name: Release - Publish NuGet Package
22

33
on:
44
push:
55
branches:
6-
- release/* # Default release branch
6+
- master
77

88
jobs:
9+
release-please:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
pull-requests: write
14+
issues: write
15+
steps:
16+
- uses: googleapis/release-please-action@v4
17+
with:
18+
target-branch: ${{ github.ref_name }}
19+
manifest-file: .release-please-manifest.json
20+
config-file: release-please-config.json
21+
922
publish:
23+
needs: release-please
24+
if: ${{ github.repository_owner == 'supabase-community' && startsWith(github.event.head_commit.message, 'chore(master)') && github.ref == 'refs/heads/master' && github.event_name == 'push' }}
1025
name: build, pack & publish
1126
runs-on: ubuntu-latest
1227
steps:

.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.2"
3+
}

Storage/Storage.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@
1616
<Title>Supabase Storage</Title>
1717
<PackageIconUrl>https://avatars.githubusercontent.com/u/54469796?s=200&amp;v=4</PackageIconUrl>
1818
<PackageTags>supabase, storage</PackageTags>
19+
<!-- x-release-please-start-version -->
1920
<ReleaseVersion>2.0.2</ReleaseVersion>
2021
<PackageVersion>2.0.2</PackageVersion>
22+
<!-- x-release-please-end -->
2123
<RepositoryUrl>https://github.com/supabase-community/storage-csharp</RepositoryUrl>
2224
<RepositoryType>git</RepositoryType>
2325
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
@@ -33,7 +35,7 @@
3335
</PropertyGroup>
3436

3537
<PropertyGroup Condition=" '$(Version)' == '' ">
36-
<VersionPrefix Condition=" '$(VersionPrefix)' == '' ">2.0.2</VersionPrefix>
38+
<VersionPrefix Condition=" '$(VersionPrefix)' == '' ">2.0.2</VersionPrefix> <!-- x-release-please-version -->
3739
<Version Condition=" '$(Version)' == '' ">$(VersionPrefix)</Version>
3840
</PropertyGroup>
3941

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+
"Storage/Storage.csproj"
12+
]
13+
}
14+
},
15+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
16+
}

0 commit comments

Comments
 (0)