Skip to content
Merged
Show file tree
Hide file tree
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
35 changes: 32 additions & 3 deletions .github/workflows/release-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,17 @@ permissions:

jobs:
approved:
name: fast-forward
if: |
github.event.pull_request.head.ref == 'develop' &&
github.event.pull_request.base.ref == 'main' &&
github.event.review.state == 'approved'
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
outputs:
release_tag: ${{ steps.latest-release.outputs.tagName }}
steps:
- uses: actions/checkout@v6
with:
Expand All @@ -29,21 +33,46 @@ jobs:
git checkout main
git merge --ff-only "${{ github.event.pull_request.head.sha }}"
git push origin main
- id: latest-release
run: |
latest=$(gh release list --limit 1 --json tagName --jq '.[].tagName')
gh release edit $latest --latest --prerelease=false
echo "tagName=$latest" >> $GITHUB_OUTPUT
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

deploy:
tag:
name: Move latest tag
needs:
- approved
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
contents: read
# Required for npm OIDC
id-token: write
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: latest
registry-url: https://registry.npmjs.org
- run: npm dist-tag add "supabase@${RELEASE_TAG#v}" latest
env:
RELEASE_TAG: ${{ needs.approved.outputs.release_tag }}

deploy:
needs:
- approved
- tag
# Call workflow explicitly because events from actions cannot trigger more actions
uses: ./.github/workflows/release.yml
with:
release: ${{ needs.approved.outputs.release_tag }}
secrets: inherit

release:
name: semantic-release
if: ${{ github.event_name != 'pull_request_review' }}
runs-on: ubuntu-latest
permissions:
contents: write
Expand Down
54 changes: 12 additions & 42 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,24 @@
name: Release

on:
push:
branches:
- main
workflow_call:
inputs:
release:
required: true
type: string
workflow_dispatch:
inputs:
release:
description: "v1.0.0"
required: true
type: string

permissions:
contents: read

jobs:
settings:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
outputs:
release_tag: ${{ steps.prerelease.outputs.tagName }}
steps:
- uses: actions/checkout@v6
- id: prerelease
run: |
gh release list --limit 1 --json tagName --jq \
'.[]|to_entries|map("\(.key)=\(.value|tostring)")|.[]' >> $GITHUB_OUTPUT
- run: gh release edit ${{ steps.prerelease.outputs.tagName }} --latest --prerelease=false

commit:
name: Publish Brew and Scoop
needs:
- settings
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
Expand All @@ -47,26 +35,12 @@ jobs:
repositories: |
homebrew-tap
scoop-bucket
- run: go run tools/publish/main.go ${{ needs.settings.outputs.release_tag }}
- run: go run tools/publish/main.go ${{ inputs.release }}
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}

publish:
name: Publish NPM
needs:
- settings
permissions:
contents: read
id-token: write
uses: ./.github/workflows/tag-npm.yml
with:
release: ${{ needs.settings.outputs.release_tag }}
secrets: inherit

compose:
name: Bump self-hosted versions
needs:
- settings
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
Expand All @@ -89,9 +63,7 @@ jobs:
changelog:
name: Publish changelog
needs:
- settings
- commit
- publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
Expand All @@ -114,8 +86,6 @@ jobs:

docs:
name: Publish reference docs
needs:
- settings
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
Expand All @@ -131,6 +101,6 @@ jobs:
owner: ${{ github.repository_owner }}
repositories: |
supabase
- run: go run docs/main.go ${{ needs.settings.outputs.release_tag }} | go run tools/bumpdoc/main.go apps/docs/spec/cli_v1_commands.yaml
- run: go run docs/main.go ${{ inputs.release }} | go run tools/bumpdoc/main.go apps/docs/spec/cli_v1_commands.yaml
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
34 changes: 0 additions & 34 deletions .github/workflows/tag-npm.yml

This file was deleted.

Loading