-
Notifications
You must be signed in to change notification settings - Fork 96
62 lines (52 loc) · 1.76 KB
/
Copy pathrelease.yml
File metadata and controls
62 lines (52 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Publish NuGet Package
on:
push:
branches:
- master
workflow_dispatch:
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' && 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
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.x
- name: Wait for tests to succeed
uses: lewagon/wait-on-check-action@v1.3.1
with:
ref: ${{ github.ref }}
check-name: build-and-test
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- 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 ${{ steps.login.outputs.NUGET_API_KEY }}