File tree Expand file tree Collapse file tree 1 file changed +50
-0
lines changed
packages/core/auth-js/.github/workflows Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Dogfooding Check
2+
3+ on :
4+ pull_request_review :
5+ types : [submitted, edited]
6+
7+ pull_request_target :
8+ types :
9+ - opened
10+ branches :
11+ - ' *'
12+
13+ jobs :
14+ check_dogfooding :
15+ runs-on : ubuntu-latest
16+ steps :
17+ - uses : actions/checkout@v4
18+ if : github.event.pull_request.base.ref == 'master' && github.event.pull_request.head.ref == 'release-please--branches--master'
19+ with :
20+ ref : master # used to identify the latest RC version via git describe --tags --match rc*
21+ fetch-depth : 0
22+
23+ - if : github.event.pull_request.base.ref == 'master' && github.event.pull_request.head.ref == 'release-please--branches--master'
24+ run : |
25+ set -ex
26+
27+ # finds the latest RC version on master
28+ RELEASE_VERSION=@supabase/auth-js@$(node -e "const a = '$(git describe --tags --match rc*)'.replace(/^rc/, '').split('-'); console.log(a[0] + '-' + a[1]);")
29+
30+ # use some clever Ruby magic to extract the snapshots['@supabase/auth-js@...'] version from the pnpm-lock.yaml file
31+ STUDIO_VERSION=$(curl 'https://raw.githubusercontent.com/supabase/supabase/refs/heads/master/pnpm-lock.yaml' | ruby -e 'require("yaml"); l = YAML.load(STDIN); puts(l["snapshots"].find { |k, v| k.start_with? "@supabase/auth-js" }.first)')
32+
33+ echo "Expecting RC version $RELEASE_VERSION to be used in Supabase Studio."
34+
35+ if [ "$STUDIO_VERSION" != "$RELEASE_VERSION" ]
36+ then
37+ echo "Version in Supabase Studio is not the latest release candidate. Please release this RC first to proof the release before merging this PR."
38+ exit 1
39+ fi
40+
41+ echo "Release away!"
42+ exit 0
43+
44+ - if : github.event.pull_request.base.ref != 'master' || github.event.pull_request.head.ref != 'release-please--branches--master'
45+ run : |
46+ set -ex
47+
48+ echo "This PR is not subject to dogfooding checks."
49+ exit 0
50+
You can’t perform that action at this time.
0 commit comments