Skip to content

Commit 4bded67

Browse files
authored
docs(repo): update release docs (#1835)
1 parent 53f9aa2 commit 4bded67

File tree

2 files changed

+66
-64
lines changed

2 files changed

+66
-64
lines changed

docs/MIGRATION.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
### What Changed
1414

15-
Starting with version `2.XX.0` (where XX is the version where this change is released), all Supabase JavaScript libraries require **Node.js 20 or later**. The `@supabase/node-fetch` polyfill has been removed, and native fetch support is now required.
15+
Starting with version `2.79.0`, all Supabase JavaScript libraries require **Node.js 20 or later**. The `@supabase/node-fetch` polyfill has been removed, and native fetch support is now required.
1616

1717
### Why?
1818

@@ -55,12 +55,12 @@ npm install @supabase/auth-js@latest
5555

5656
### Supported Environments
5757

58-
**Node.js 20+** - Native fetch support
59-
**Modern browsers** - Chrome 42+, Firefox 39+, Safari 10.1+, Edge 14+
60-
**Deno 1.0+** - Native fetch built-in
61-
**Bun 0.1+** - Native fetch built-in
62-
**React Native** - With fetch polyfill provided by the framework
63-
**Expo** - With fetch polyfill provided by the framework
58+
- **Node.js 20+** - Native fetch support
59+
- **Modern browsers** - All modern browsers
60+
- **Deno 1.0+** - Native fetch built-in
61+
- **Bun 0.1+** - Native fetch built-in
62+
- **React Native** - With fetch polyfill provided by the framework
63+
- **Expo** - With fetch polyfill provided by the framework
6464

6565
### Troubleshooting
6666

@@ -76,9 +76,7 @@ This means you're running Node.js < 20. Solutions:
7676
If you must use Node.js 18, install the last version that supported it:
7777

7878
```bash
79-
# Find the last version that supported Node.js 18
80-
# (This will be version 2.XX.X where XX is one less than the version with this change)
81-
npm install @supabase/supabase-js@2.XX.X
79+
npm install @supabase/supabase-js@2.78.0
8280
```
8381

8482
⚠️ **Warning:** Using Node.js 18 is not recommended as it no longer receives security updates.

docs/RELEASE.md

Lines changed: 58 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,46 @@
11
# Release Workflows
22

3-
- [.github/workflows/main-ci-release.yml](.github/workflows/main-ci-release.yml) - Main CI & automated canary releases
4-
- [.github/workflows/release-stable.yml](.github/workflows/release-stable.yml) - Manual stable releases
3+
- [.github/workflows/publish.yml](.github/workflows/publish.yml) - Canary and stable releases
54
- [.github/workflows/preview-release.yml](.github/workflows/preview-release.yml) - PR preview releases
65

76
## Overview
87

98
This monorepo uses a fixed release model where all packages share a single version number and are released together. There are three types of releases:
109

11-
1. **Canary Releases** - Automated pre-releases on every commit to master
12-
2. **Stable Releases** - Manual releases for production use
10+
1. **Canary Releases** - Automated pre-releases on every conventional commit to `master`
11+
2. **Stable Releases** - Manual releases for production use (requires maintainer permission)
1312
3. **Preview Releases** - PR-specific releases for testing changes
1413

1514
## Workflows
1615

1716
### 🤖 Canary Releases (Automated)
1817

19-
**File:** `main-ci-release.yml`
20-
**Trigger:** Every push to `master` branch
18+
**Workflow:** `publish.yml`
19+
**Trigger:** Every push to `master` branch (after CI passes)
20+
**Script:** `scripts/release-canary.ts`
2121
**Purpose:** Immediate feedback with pre-release versions
2222

2323
#### What it does
2424

25-
1. **CI Pipeline**: Runs all CI checks
26-
2. **Version Bump**: Creates a new pre-release version using conventional commits
27-
28-
3. **NPM Publish**: Publishes all packages to npm with `canary` dist-tag
29-
4. **GitHub Release**: Creates a pre-release tag on GitHub with changelog
25+
1. **Checks for conventional commits** - Only releases if commits warrant a version bump
26+
2. **Version Bump** - Creates a new pre-release version using `prerelease` specifier with `canary` preid
27+
3. **Build** - Rebuilds all packages with updated versions
28+
4. **Changelog** - Generates changelogs from conventional commits
29+
5. **NPM Publish** - Publishes all packages to npm with `canary` dist-tag (marked as prerelease)
30+
6. **Legacy Package** - Publishes `@supabase/gotrue-js` as legacy mirror of `auth-js`
3031

3132
#### Example flow
3233

33-
- Make a change
34-
3534
```bash
3635
# Commit with conventional format
3736
git commit -m "fix(auth): resolve token refresh issue"
37+
# Merge PR to master
38+
# → CI runs and passes
39+
# → Version bumped to e.g., 2.80.1-canary.0
40+
# → Published to npm with 'canary' dist-tag
41+
# → All packages versioned identically
3842
```
3943

40-
- Open PR and get it merged to `master`
41-
42-
- Then:
43-
→ CI runs and passes
44-
→ Version bumped to e.g., 2.80.1-canary.0
45-
→ Published to npm with 'canary' dist-tag
46-
→ GitHub pre-release tag created
47-
→ All packages versioned identically
48-
4944
#### Install canary versions
5045

5146
```bash
@@ -55,21 +50,29 @@ npm install @supabase/auth-js@canary
5550
npm install @supabase/storage-js@canary
5651
```
5752

53+
**Note:** Canary releases are skipped if no conventional commits are detected that warrant a release.
54+
5855
### 👨‍💻 Stable Releases (Manual)
5956

60-
**File:** `release-stable.yml`
61-
**Trigger:** Manual workflow dispatch (repository owners only)
57+
**Workflow:** `publish.yml` (manual trigger)
58+
**Script:** `scripts/release-stable.ts`
59+
**Trigger:** Manual workflow dispatch by maintainers
60+
**Permission:** Members of `@supabase/admin` or `@supabase/sdk` teams only
6261
**Purpose:** Production-ready releases for end users
6362

6463
#### How it works
6564

66-
1. **Version Specification**: Repository owner provides a version specifier
65+
1. **Version Specification**: Maintainer provides a version specifier via workflow input
6766
2. **Version Bump**: Nx applies the version change to all packages
68-
3. **Changelog Update**: Generates changelogs from conventional commits
69-
4. **NPM Publish**: Publishes all packages with `latest` dist-tag
70-
5. **PR Creation**: Automatically creates a PR with changelog updates
67+
3. **Build**: Rebuilds all packages with updated versions
68+
4. **Changelog Update**: Generates changelogs from conventional commits (since last stable tag)
69+
5. **NPM Publish**: Publishes all packages with `latest` dist-tag
70+
6. **Legacy Package**: Publishes `@supabase/gotrue-js` as legacy mirror
71+
7. **Release Branch**: Creates a release branch with changelog updates
72+
8. **PR Creation**: Automatically creates and auto-merges a PR with changelog updates
73+
9. **Documentation**: Triggers documentation update workflow
7174

72-
#### Version Specifiers (for repo owners)
75+
#### Version Specifiers
7376

7477
You can specify the version in two ways:
7578

@@ -89,13 +92,13 @@ You can specify the version in two ways:
8992

9093
### 🔄 Preview Releases (PR-based)
9194

92-
**File:** `preview-release.yml`
95+
**Workflow:** `preview-release.yml`
9396
**Trigger:** PR with `trigger: preview` label
9497
**Purpose:** Test PR changes before merging
9598

9699
#### How it works
97100

98-
1. **Label Trigger**: Contributors request preview by asking maintainers to add label
101+
1. **Label Trigger**: Contributors request preview by asking maintainers to add `trigger: preview` label
99102
2. **Build**: Builds all affected packages
100103
3. **Publish**: Uses [pkg.pr.new](https://pkg.pr.new) to create preview packages
101104
4. **Comment**: Adds installation instructions to PR
@@ -121,15 +124,16 @@ Canary releases are **fully automated**. Simply:
121124
2. Use conventional commits with type and scope (e.g., `fix(auth):`, `feat(realtime):`, `chore(repo):`)
122125
3. Create and merge PR to `master` branch
123126
4. Workflow automatically:
124-
- Runs CI checks
125-
- Creates pre-release version
127+
- Runs CI checks (`ci-core` and `ci-supabase-js`)
128+
- Checks for conventional commits that warrant a release
129+
- Creates pre-release version (skips if no commits warrant release)
126130
- Publishes to npm with `canary` tag
127-
- Creates GitHub pre-release
131+
- Creates GitHub changelog entries
128132

129-
### Running Stable Release (repository owners only)
133+
### Running Stable Release (maintainers only)
130134

131135
1. **Navigate to Actions tab** in GitHub repository
132-
2. **Select "Release Stable"** workflow
136+
2. **Select "Publish releases"** workflow
133137
3. **Click "Run workflow"**
134138
4. **Enter version specifier:**
135139
- For patch release: `patch`
@@ -138,11 +142,14 @@ Canary releases are **fully automated**. Simply:
138142
- For specific version: `v2.81.0` or `2.81.0`
139143
5. **Click "Run workflow"**
140144
6. **Workflow automatically:**
145+
- Validates you're a member of `@supabase/admin` or `@supabase/sdk`
141146
- Bumps version for all packages
142-
- Generates changelogs
147+
- Generates changelogs since last stable tag
143148
- Publishes to npm with `latest` tag
144-
- Creates release branch and PR
149+
- Creates release branch and PR with changelog updates
145150
- Enables auto-merge on PR
151+
- Triggers documentation update workflow
152+
- Sends Slack notifications
146153

147154
### Requesting Preview Release (contributors)
148155

@@ -165,23 +172,19 @@ Canary releases are **fully automated**. Simply:
165172
- Generated from conventional commits
166173
- Per-package CHANGELOG.md files
167174
- Unchanged packages show "No user-facing changes in this release"
168-
- GitHub releases created automatically
175+
- Stable releases generate changelogs from last stable tag
169176

170177
### 🔐 Security & Permissions
171178

172179
- Canary releases use GitHub App token for automation
173-
- Stable releases restricted to repository owners
174-
- NPM publishing uses secure tokens
180+
- Stable releases restricted to `@supabase/admin` or `@supabase/sdk` team members
181+
- NPM publishing uses OIDC trusted publishing
175182
- All releases signed and traceable
176183

177-
### Nx Release Configuration
178-
179-
The workflows rely on `nx.json` release configuration:
180-
181184
### Release Scripts
182185

183-
- **`scripts/release-canary.ts`** - Handles canary releases with `canary` preid
184-
- **`scripts/release-stable.ts`** - Handles stable releases with version specifier input
186+
- **`scripts/release-canary.ts`** - Handles canary releases with `canary` preid, skips if no conventional commits
187+
- **`scripts/release-stable.ts`** - Handles stable releases with version specifier input, creates release branch and PR
185188

186189
## Best Practices
187190

@@ -192,24 +195,25 @@ The workflows rely on `nx.json` release configuration:
192195
- `feat(realtime):` for new features (minor release)
193196
- `feat(repo)!:` or `BREAKING CHANGE:` for breaking changes (major release)
194197
2. **Request preview releases** for complex PRs
195-
3. **Monitor canary releases** to verify your changes
198+
3. **Monitor canary releases** to verify your changes work as expected
196199

197-
### For Repository Owners
200+
### For Maintainers
198201

199202
1. **Release cadence**:
200-
- Canary: Automatic on every `master` commit
201-
- Stable: Weekly or as needed
203+
- Canary: Automatic on every `master` commit (if conventional commits present)
204+
- Stable: Weekly or as needed based on canary feedback
202205
- Major: Coordinate with team and users
203206
2. **Version strategy**:
204207
- Use `patch` for bug fixes
205208
- Use `minor` for new features
206209
- Use `major` for breaking changes
207210
3. **Monitor package health** after releases
208-
4. **Review PR auto-merge** from release workflow
211+
4. **Review PR auto-merge** from release workflow (changelog updates)
212+
5. **Verify documentation** updates after stable releases
209213

210214
### For Emergency Releases
211215

212216
1. **Fix in `master` first** - Apply fix and let canary release
213217
2. **Test canary** - Verify fix works in canary version
214-
3. **Release stable** - Use stable workflow with `patch`
215-
4. **Document incident** - Update changelog with details
218+
3. **Release stable** - Use stable workflow with `patch` specifier
219+
4. **Document incident** - Update changelog with details if needed

0 commit comments

Comments
 (0)