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
16 changes: 9 additions & 7 deletions .github/workflows/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,25 @@ name: Install
on:
pull_request:
paths:
- '.github/workflows/install.yml'
- 'package.json'
- 'scripts/**'
- ".github/workflows/install.yml"
- "package.json"
- "scripts/**"
push:
branches:
- develop
paths:
- '.github/workflows/install.yml'
- 'package.json'
- 'scripts/**'
- ".github/workflows/install.yml"
- "package.json"
- "scripts/**"

permissions:
contents: write
contents: read

jobs:
pack:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v6

Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/release-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
workflow_dispatch:

permissions:
contents: write
contents: read

jobs:
release:
Expand Down Expand Up @@ -79,7 +79,6 @@ jobs:
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
repositories: |
cli
homebrew-tap
scoop-bucket
- run: go run tools/publish/main.go --beta "${{ needs.release.outputs.new-release-version }}"
Expand Down
61 changes: 41 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,25 @@ on:
workflow_call:

permissions:
contents: write
packages: write
# Required for npm OIDC
id-token: write
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 }}
app_token: ${{ steps.app-token.outputs.token }}
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
- id: app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
repositories: |
cli
homebrew-tap
scoop-bucket
supabase

commit:
name: Publish Brew and Scoop
Expand All @@ -50,9 +38,18 @@ jobs:
with:
go-version-file: go.mod
cache: true
- id: app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
repositories: |
homebrew-tap
scoop-bucket
- run: go run tools/publish/main.go ${{ needs.settings.outputs.release_tag }}
env:
GITHUB_TOKEN: ${{ needs.settings.outputs.app_token }}
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}

publish:
name: Publish NPM
Expand All @@ -77,9 +74,17 @@ jobs:
with:
go-version-file: go.mod
cache: true
- id: app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
repositories: |
supabase
- run: go run tools/selfhost/main.go
env:
GITHUB_TOKEN: ${{ needs.settings.outputs.app_token }}
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}

changelog:
name: Publish changelog
Expand All @@ -94,9 +99,17 @@ jobs:
with:
go-version-file: go.mod
cache: true
- id: app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
repositories: |
supabase
- run: go run tools/changelog/main.go ${{ secrets.SLACK_CHANNEL }}
env:
GITHUB_TOKEN: ${{ needs.settings.outputs.app_token }}
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}

docs:
Expand All @@ -110,6 +123,14 @@ jobs:
with:
go-version-file: go.mod
cache: true
- id: app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
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
env:
GITHUB_TOKEN: ${{ needs.settings.outputs.app_token }}
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
Loading