Skip to content

chore(repo): Rename @staging tag to @canary #2015

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Nov 6, 2023
Merged
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
6 changes: 6 additions & 0 deletions .changeset/curvy-mails-rhyme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@clerk/clerk-js': patch
'@clerk/shared': patch
---

Rename the @staging tag to @canary. Drop support for @next tag.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Staging release
run-name: Staging release from ${{ github.ref_name }}
name: Canary release
run-name: Canary release from ${{ github.ref_name }}

on:
push:
@@ -11,7 +11,7 @@ concurrency:
cancel-in-progress: true

jobs:
staging-release:
canary-release:
if: ${{ github.repository == 'clerk/javascript' }}
runs-on: ${{ vars.RUNNER_NORMAL }}
timeout-minutes: ${{ fromJSON(vars.TIMEOUT_MINUTES_NORMAL) }}
@@ -29,13 +29,13 @@ jobs:
- name: Setup
uses: ./.github/actions/setup

- name: Version packages for staging
- name: Version packages for canary
id: version-packages
run: npm run version:staging | tail -1 >> "$GITHUB_OUTPUT"
run: npm run version:canary | tail -1 >> "$GITHUB_OUTPUT"

- name: Staging release
- name: Canary release
if: steps.version-packages.outputs.success == '1'
run: npm run release:staging
run: npm run release:canary
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
@@ -51,18 +51,18 @@ jobs:
const clerkjsVersion = require('./packages/clerk-js/package.json').version;
const nextjsVersion = require('./packages/nextjs/package.json').version;

if (clerkjsVersion.includes('staging')) {
if (clerkjsVersion.includes('canary')) {
console.log('clerk-js changed, will notify clerk/cloudflare-workers');
github.rest.actions.createWorkflowDispatch({
owner: 'clerk',
repo: 'cloudflare-workers',
workflow_id: 'release-staging-clerkjs-proxy.yml',
workflow_id: 'release-canary-clerkjs-proxy.yml',
ref: 'main',
inputs: { version: clerkjsVersion }
})
}

if (nextjsVersion.includes('staging')) {
if (nextjsVersion.includes('canary')) {
console.log('clerk/nextjs changed, will notify clerk/accounts');
github.rest.actions.createWorkflowDispatch({
owner: 'clerk',
16 changes: 8 additions & 8 deletions docs/CICD.md
Original file line number Diff line number Diff line change
@@ -2,10 +2,10 @@

## TLDR (day-to-day dev flow)

Every time a PR is merged into `main`, an automated staging release will happen. Once the packages are pushed to `npm`, the following actions will take place:
Every time a PR is merged into `main`, an automated canary release will happen. Once the packages are pushed to `npm`, the following actions will take place:

- The staging `clerkjs-proxy` worker will start serving the most recent `@staging` version of `@clerk/clerk-js`, completely bypassing any Cloudflare and JSDeliver edge caches.
- The staging Accounts project will be deployed using the most recent `@staging` version of `@clerk/nextjs`.
- The canary `clerkjs-proxy` worker will start serving the most recent `@canary` version of `@clerk/clerk-js`, completely bypassing any Cloudflare and JSDeliver edge caches.
- The canary Accounts project will be deployed using the most recent `@canary` version of `@clerk/nextjs`.

## Stable releases

@@ -17,16 +17,16 @@ Actions that will be triggered:

For more details, refer to [PUBLISH.md](https://github.com/clerk/javascript/blob/main/docs/PUBLISH.md).

## Automated staging releases
## Automated canary releases

A staging release will be triggered every time PR is merged into `main`. Once versioning and publishing is done, the `clerk/javascript` repo will dispatch a workflow event, notifying other related Clerk repos of the new releases.
A canary release will be triggered every time PR is merged into `main`. Once versioning and publishing is done, the `clerk/javascript` repo will dispatch a workflow event, notifying other related Clerk repos of the new releases.

Actions that will be triggered:

- `clerk/cloudflare-workers`: The latest clerk-js versions in `clerkjs-proxy/wrangler.toml` will be updated and directly committed to `main`. A second workflow will perform a staging release of the `clerkjs-proxy` worker.
- `clerk/accounts`: A new Accounts deployment will take place, using the most recent staging `@clerk/nextjs` version. This change will not be committed to `main`.
- `clerk/cloudflare-workers`: The latest clerk-js versions in `clerkjs-proxy/wrangler.toml` will be updated and directly committed to `main`. A second workflow will perform a canary release of the `clerkjs-proxy` worker.
- `clerk/accounts`: A new Accounts deployment will take place, using the most recent canary `@clerk/nextjs` version. This change will not be committed to `main`.

For more details about staging releases, refer to [PUBLISH.md](https://github.com/clerk/javascript/blob/main/docs/PUBLISH.md).
For more details about canary releases, refer to [PUBLISH.md](https://github.com/clerk/javascript/blob/main/docs/PUBLISH.md).

## Quality checks

10 changes: 5 additions & 5 deletions docs/PUBLISH.md
Original file line number Diff line number Diff line change
@@ -10,13 +10,13 @@ Every time a PR is merged into `main`, the changesets action parses all changese

To release a new stable version of all Clerk packages, find the "Version Packages" PR, verify the changes, and merge it.

## Publishing staging package versions (`@staging`)
## Publishing canary package versions (`@canary`)

An automated staging release will be take place every time a PR gets merged into `main`.
An automated canary release will be take place every time a PR gets merged into `main`.

- Staging versions use the following format: `@clerk/package@x.y.z-staging.commit`, where `package` is the package name, `x`,`y`,`z` are the major, minor and patch versions respectively, `staging` is a stable prerelease mame and `commit` is the id of the last commit in the branch.
- Currently, staging version changes are _not_ committed to the repo and no git tags will be generated. Using this strategy, we avoid merge conflicts, allowing us to constantly deploy staging versions without switching the repo to a "prerelease" mode.
- During a staging release, `@clerk/clerk-js` will also be released. If needed, use the `clerkJSVersion` prop to use a specific version, eg: `<ClerkProvider clerkJSVersion='4.1.1-staging.90012' />`
- Staging versions use the following format: `@clerk/package@x.y.z-canary.commit`, where `package` is the package name, `x`,`y`,`z` are the major, minor and patch versions respectively, `canary` is a stable prerelease mame and `commit` is the id of the last commit in the branch.
- Currently, canary version changes are _not_ committed to the repo and no git tags will be generated. Using this strategy, we avoid merge conflicts, allowing us to constantly deploy canary versions without switching the repo to a "prerelease" mode.
- During a canary release, `@clerk/clerk-js` will also be released. If needed, use the `clerkJSVersion` prop to use a specific version, eg: `<ClerkProvider clerkJSVersion='4.1.1-canary.90012' />`
- A package will not be published if it's not affected by a changeset.

## Publishing snapshot package versions (`@snapshot`)
Loading