Skip to content

Ci/rc release etc#2188

Draft
mandarini wants to merge 2 commits intomasterfrom
ci/rc-release-etc
Draft

Ci/rc release etc#2188
mandarini wants to merge 2 commits intomasterfrom
ci/rc-release-etc

Conversation

@mandarini
Copy link
Copy Markdown
Contributor

@mandarini mandarini commented Mar 24, 2026

Description

What changed?

  • Added a new RC release workflow (release-rc job in publish.yml + scripts/release-rc.ts) that allows maintainers to publish versioned RC packages (rc dist-tag) from feature branches before merging to master
  • Fixed canary versioning so that the bump type is derived from conventional commits: a feat: commit now produces a minor canary (e.g. 2.101.0-canary.0) instead of always bumping patch regardless of commit type
  • Extracted shared getLastStableTag() and getArg() helpers into scripts/utils.ts (previously duplicated in release-stable.ts)
  • Added Nx agent skills (.agents/skills/) for monitor-ci, nx-workspace, nx-generate, nx-import, nx-plugins, nx-run-tasks, and link-workspace-packages
  • Added AGENTS.md with Nx workspace guidelines for AI agents
  • Updated .gitignore to exclude .nx/polygraph, .claude/worktrees, and .claude/settings.local.json
  • Updated docs/RELEASE.md to document the RC workflow, canary versioning fix, and updated usage instructions

Why was this change needed?

The previous release workflow only had canary and stable releases with no intermediate step for validating features on feature branches before merging to master. This made it difficult to dogfood or share pre-release builds of unreleased features without polluting the canary stream.

The canary versioning fix ensures that feat: commits correctly produce minor canary bumps rather than patch bumps, which was misleading about the nature of the change.

Breaking changes

  • This PR contains no breaking changes

Checklist

  • I have read the Contributing Guidelines
  • My PR title follows the conventional commit format: <type>(<scope>): <description>
  • I have run npx nx format to ensure consistent code formatting
  • I have added tests for new functionality (if applicable)
  • I have updated documentation (if applicable)

Additional notes

The RC workflow is gated to members of @supabase/admin or @supabase/sdk teams, matching the same authorization used for stable releases. RC changelogs are anchored to the last stable tag so that RC tags never affect the commit range used by future stable or canary releases.

Comment on lines +287 to +296
name: Notify Slack for RC failure
needs: release-rc
if: ${{ always() && github.event_name == 'workflow_dispatch' && needs.release-rc.result == 'failure' }}
uses: ./.github/workflows/slack-notify.yml
secrets: inherit
with:
title: 'RC Release'
status: 'failure'

notify-rc-success:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}

Copilot Autofix

AI 5 days ago

In general, the fix is to add an explicit permissions block to each job that currently relies on default token permissions and grant only the minimal scopes required. For jobs that simply invoke a reusable workflow for Slack notifications, they usually need no repository access, so permissions: {} (no permissions) or, if needed for logging or metadata, permissions: contents: read is typically sufficient.

For this workflow, two jobs lack explicit permissions: notify-rc-failure (line 286 onward) and notify-rc-success (line 296 onward). Both only uses: ./.github/workflows/slack-notify.yml, inherit secrets, and pass some string inputs; nothing here suggests they require any GitHub API write permissions. The least-privilege and clearest fix is to explicitly disable GITHUB_TOKEN permissions for these jobs with permissions: {}. This ensures they do not accidentally gain broader repository access if defaults are read-write or change in the future, without altering their functional behavior.

Concretely:

  • In .github/workflows/publish.yml, under notify-rc-failure, insert a permissions: {} key alongside name, needs, if, uses, etc.
  • Similarly, under notify-rc-success, insert permissions: {}.
    No imports or additional methods are needed; this is purely a YAML configuration change.
Suggested changeset 1
.github/workflows/publish.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -287,6 +287,7 @@
     name: Notify Slack for RC failure
     needs: release-rc
     if: ${{ always() && github.event_name == 'workflow_dispatch' && needs.release-rc.result == 'failure' }}
+    permissions: {}
     uses: ./.github/workflows/slack-notify.yml
     secrets: inherit
     with:
@@ -297,6 +298,7 @@
     name: Notify Slack for RC success
     needs: release-rc
     if: ${{ github.event_name == 'workflow_dispatch' && needs.release-rc.result == 'success' }}
+    permissions: {}
     uses: ./.github/workflows/slack-notify.yml
     secrets: inherit
     with:
EOF
@@ -287,6 +287,7 @@
name: Notify Slack for RC failure
needs: release-rc
if: ${{ always() && github.event_name == 'workflow_dispatch' && needs.release-rc.result == 'failure' }}
permissions: {}
uses: ./.github/workflows/slack-notify.yml
secrets: inherit
with:
@@ -297,6 +298,7 @@
name: Notify Slack for RC success
needs: release-rc
if: ${{ github.event_name == 'workflow_dispatch' && needs.release-rc.result == 'success' }}
permissions: {}
uses: ./.github/workflows/slack-notify.yml
secrets: inherit
with:
Copilot is powered by AI and may make mistakes. Always verify output.
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 24, 2026

Open in StackBlitz

@supabase/auth-js

npm i https://pkg.pr.new/@supabase/auth-js@2188

@supabase/functions-js

npm i https://pkg.pr.new/@supabase/functions-js@2188

@supabase/postgrest-js

npm i https://pkg.pr.new/@supabase/postgrest-js@2188

@supabase/realtime-js

npm i https://pkg.pr.new/@supabase/realtime-js@2188

@supabase/storage-js

npm i https://pkg.pr.new/@supabase/storage-js@2188

@supabase/supabase-js

npm i https://pkg.pr.new/@supabase/supabase-js@2188

commit: 47b2f8e

@mandarini mandarini self-assigned this Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant