Skip to content
Merged
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
15 changes: 12 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: Release - Publish NuGet Package
name: Publish NuGet Package

on:
push:
branches:
- master
workflow_dispatch:

jobs:
release-please:
Expand All @@ -21,9 +22,11 @@ jobs:

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' }}
if: ${{ github.repository_owner == 'supabase-community' && github.ref == 'refs/heads/master' && (github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && startsWith(github.event.head_commit.message, 'chore(master)'))) }}
name: build, pack & publish
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v3

Expand All @@ -49,5 +52,11 @@ jobs:
- name: Generate package
run: dotnet pack ./Supabase/Supabase.csproj --configuration Release

- name: NuGet login
uses: NuGet/login@v1
id: login
with:
user: supabase_publisher

- name: Publish on version change
run: dotnet nuget push "**/*.nupkg" --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }}
run: dotnet nuget push "**/*.nupkg" --source https://api.nuget.org/v3/index.json --api-key ${{ steps.login.outputs.NUGET_API_KEY }}
Loading