Skip to content

Commit 5dec17e

Browse files
committed
chore(repo): Switch to canary-core3
1 parent 1efad0a commit 5dec17e

File tree

8 files changed

+93
-104
lines changed

8 files changed

+93
-104
lines changed

.alpha-v6-branch

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 70 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,83 @@
1-
name: Alpha-v6 release
2-
run-name: Alpha-v6 release from ${{ github.ref_name }}
1+
name: canary-core3 release
2+
run-name: canary-core3 release from ${{ github.ref_name }}
33

44
on:
5-
push:
6-
branches:
7-
- main
5+
push:
6+
branches:
7+
- main
88

99
concurrency:
10-
group: ${{ github.workflow }}-${{ github.ref }}
11-
cancel-in-progress: true
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
1212

1313
jobs:
14-
alpha-v6-release:
15-
if: ${{ github.repository == 'clerk/javascript' }}
16-
runs-on: ${{ vars.RUNNER_NORMAL || 'ubuntu-latest' }}
17-
timeout-minutes: ${{ vars.TIMEOUT_MINUTES_NORMAL && fromJSON(vars.TIMEOUT_MINUTES_NORMAL) || 10 }}
18-
env:
19-
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
20-
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
21-
TURBO_CACHE: remote:rw
22-
permissions:
23-
contents: read
24-
id-token: write
25-
steps:
26-
- name: Checkout repo
27-
uses: actions/checkout@v4
14+
canary-core3-release:
15+
if: ${{ github.repository == 'clerk/javascript' }}
16+
runs-on: ${{ vars.RUNNER_NORMAL || 'ubuntu-latest' }}
17+
timeout-minutes: ${{ vars.TIMEOUT_MINUTES_NORMAL && fromJSON(vars.TIMEOUT_MINUTES_NORMAL) || 10 }}
18+
env:
19+
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
20+
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
21+
TURBO_CACHE: remote:rw
22+
permissions:
23+
contents: read
24+
id-token: write
25+
steps:
26+
- name: Checkout repo
27+
uses: actions/checkout@v4
2828

29-
- name: Setup
30-
id: config
31-
uses: ./.github/actions/init
32-
with:
33-
turbo-signature: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }}
34-
turbo-team: ${{ vars.TURBO_TEAM }}
35-
turbo-token: ${{ secrets.TURBO_TOKEN }}
36-
playwright-enabled: true # Must be present to enable caching on branched workflows
37-
registry-url: "https://registry.npmjs.org"
29+
- name: Setup
30+
id: config
31+
uses: ./.github/actions/init
32+
with:
33+
turbo-signature: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }}
34+
turbo-team: ${{ vars.TURBO_TEAM }}
35+
turbo-token: ${{ secrets.TURBO_TOKEN }}
36+
playwright-enabled: true # Must be present to enable caching on branched workflows
37+
registry-url: "https://registry.npmjs.org"
3838

39-
- name: Version packages for alpha-v6
40-
id: version-packages
41-
run: pnpm version-packages:alpha-v6 | tail -1 >> "$GITHUB_OUTPUT"
39+
- name: Version packages for canary-core3
40+
id: version-packages
41+
run: pnpm version-packages:canary-core3 | tail -1 >> "$GITHUB_OUTPUT"
4242

43-
- name: Build release
44-
if: steps.version-packages.outputs.success == '1'
45-
run: pnpm turbo build $TURBO_ARGS
43+
- name: Build release
44+
if: steps.version-packages.outputs.success == '1'
45+
run: pnpm turbo build $TURBO_ARGS
4646

47-
- name: Alpha-v6 release
48-
if: steps.version-packages.outputs.success == '1'
49-
run: pnpm release:alpha-v6
50-
env:
51-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
52-
NPM_CONFIG_PROVENANCE: true
47+
- name: canary-core3 release
48+
if: steps.version-packages.outputs.success == '1'
49+
run: pnpm release:canary-core3
50+
env:
51+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
52+
NPM_CONFIG_PROVENANCE: true
5353

54-
- name: Trigger workflows on related repos
55-
if: steps.version-packages.outputs.success == '1'
56-
uses: actions/github-script@v7
57-
with:
58-
result-encoding: string
59-
retries: 3
60-
retry-exempt-status-codes: 400,401
61-
github-token: ${{ secrets.CLERK_COOKIE_PAT }}
62-
script: |
63-
const clerkjsVersion = require('./packages/clerk-js/package.json').version;
64-
const nextjsVersion = require('./packages/nextjs/package.json').version;
54+
- name: Trigger workflows on related repos
55+
if: steps.version-packages.outputs.success == '1'
56+
uses: actions/github-script@v7
57+
with:
58+
result-encoding: string
59+
retries: 3
60+
retry-exempt-status-codes: 400,401
61+
github-token: ${{ secrets.CLERK_COOKIE_PAT }}
62+
script: |
63+
const clerkjsVersion = require('./packages/clerk-js/package.json').version;
64+
const nextjsVersion = require('./packages/nextjs/package.json').version;
6565
66-
github.rest.actions.createWorkflowDispatch({
67-
owner: 'clerk',
68-
repo: 'sdk-infra-workers',
69-
workflow_id: 'update-clerkjs.yml',
70-
ref: 'main',
71-
inputs: { version: clerkjsVersion }
72-
})
66+
github.rest.actions.createWorkflowDispatch({
67+
owner: 'clerk',
68+
repo: 'sdk-infra-workers',
69+
workflow_id: 'update-clerkjs.yml',
70+
ref: 'main',
71+
inputs: { version: clerkjsVersion }
72+
})
7373
74-
# if (nextjsVersion.includes('alpha-v6')) {
75-
# console.log('clerk/nextjs changed with alpha-v6, will notify clerk/accounts');
76-
# github.rest.actions.createWorkflowDispatch({
77-
# owner: 'clerk',
78-
# repo: 'accounts',
79-
# workflow_id: 'release-staging.yml',
80-
# ref: 'main',
81-
# inputs: { version: nextjsVersion }
82-
# })
83-
# }
74+
# if (nextjsVersion.includes('canary-core3')) {
75+
# console.log('clerk/nextjs changed with canary-core3, will notify clerk/accounts');
76+
# github.rest.actions.createWorkflowDispatch({
77+
# owner: 'clerk',
78+
# repo: 'accounts',
79+
# workflow_id: 'release-staging.yml',
80+
# ref: 'main',
81+
# inputs: { version: nextjsVersion }
82+
# })
83+
# }

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ jobs:
3939
fetch-depth: 0
4040
show-progress: false
4141

42-
- name: Safety check - Prevent production releases on alpha-v6 branch
42+
- name: Safety check - Prevent production releases on canary-core3 branch
4343
run: |
44-
if [ -f ".alpha-v6-branch" ]; then
45-
echo "❌ ERROR: This branch is marked for alpha-v6 releases only!"
44+
if [ -f ".canary-core3-branch" ]; then
45+
echo "❌ ERROR: This branch is marked for canary-core3 releases only!"
4646
echo "Production releases (latest tag) are not allowed on this branch."
4747
echo "If you need to make a production release, use the main production branch."
4848
exit 1

canary-core3-branch

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Alpha v6 Development Branch
2+
# This file marks this branch as an canary-core3 development branch.
3+
# Production releases (latest tag) are disabled on this branch.
4+
# Only canary-core3 releases are allowed.
5+

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
"nuke": "node ./scripts/nuke.mjs",
2626
"prepare": "husky install",
2727
"release": "changeset publish && git push --follow-tags",
28-
"release:alpha-v6": "changeset publish --tag alpha-v6 --no-git-tag",
2928
"release:canary": "changeset publish --tag canary --no-git-tag",
29+
"release:canary-core3": "changeset publish --tag canary-core3 --no-git-tag",
3030
"release:snapshot": "changeset publish --tag snapshot --no-git-tag",
3131
"release:verdaccio": "if [ \"$(npm config get registry)\" = \"https://registry.npmjs.org/\" ]; then echo 'Error: Using default registry' && exit 1; else TURBO_CONCURRENCY=1 pnpm build && changeset publish --no-git-tag; fi",
3232
"test": "FORCE_COLOR=1 turbo test --concurrency=${TURBO_CONCURRENCY:-80%}",
@@ -59,8 +59,8 @@
5959
"typedoc:generate": "pnpm build && pnpm typedoc:generate:skip-build",
6060
"typedoc:generate:skip-build": "typedoc --tsconfig tsconfig.typedoc.json && node .typedoc/extract-returns-and-params.mjs && rimraf .typedoc/docs && cpy '.typedoc/temp-docs/**' '.typedoc/docs' && rimraf .typedoc/temp-docs",
6161
"version-packages": "changeset version && pnpm install --lockfile-only --engine-strict=false",
62-
"version-packages:alpha-v6": "./scripts/alpha-v6.mjs",
6362
"version-packages:canary": "./scripts/canary.mjs",
63+
"version-packages:canary-core3": "./scripts/canary-core3.mjs",
6464
"version-packages:snapshot": "./scripts/snapshot.mjs",
6565
"yalc:all": "for d in packages/*/; do echo $d; cd $d; pnpm yalc push --replace --sig; cd '../../'; done"
6666
},

scripts/alpha-v6.mjs renamed to scripts/canary-core3.mjs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,16 @@
22

33
import { $, echo } from 'zx';
44

5-
import { constants } from './common.mjs';
5+
import { constants, getPackageNames } from './common.mjs';
6+
7+
const packageNames = await getPackageNames();
8+
const packageEntries = packageNames.map(name => `'${name}': patch`).join('\n');
69

710
const snapshot = `---
8-
'@clerk/backend': patch
9-
'@clerk/shared': patch
10-
'@clerk/react': patch
11-
'@clerk/clerk-js': patch
12-
'@clerk/nextjs': patch
11+
${packageEntries}
1312
---
1413
15-
Alpha-v6 release
14+
canary-core3 release
1615
`;
1716

1817
await $`pnpm dlx json -I -f ${constants.ChangesetConfigFile} -e "this.changelog = false"`;
@@ -31,7 +30,7 @@ try {
3130
// otherwise, do nothing
3231
}
3332

34-
const res = await $`pnpm changeset version --snapshot alpha-v6`;
33+
const res = await $`pnpm changeset version --snapshot canary-core3`;
3534
const success = !res.stderr.includes('No unreleased changesets found');
3635

3736
await $`git checkout HEAD -- ${constants.ChangesetConfigFile}`;

scripts/canary.mjs

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,13 @@
22

33
import { $, echo } from 'zx';
44

5-
import { constants } from './common.mjs';
5+
import { constants, getPackageNames } from './common.mjs';
6+
7+
const packageNames = await getPackageNames();
8+
const packageEntries = packageNames.map(name => `'${name}': patch`).join('\n');
69

710
const snapshot = `---
8-
'@clerk/chrome-extension': patch
9-
'@clerk/localizations': patch
10-
'@clerk/clerk-js': patch
11-
'@clerk/backend': patch
12-
'@clerk/fastify': patch
13-
'@clerk/agent-toolkit': patch
14-
'@clerk/nextjs': patch
15-
'@clerk/shared': patch
16-
'@clerk/themes': patch
17-
'@clerk/react': patch
18-
'@clerk/expo': patch
19-
'@clerk/express': patch
20-
'@clerk/testing': patch
21-
'@clerk/elements': patch
11+
${packageEntries}
2212
---
2313
2414
Canary release

scripts/snapshot.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const packageEntries = packageNames.map(name => `'${name}': patch`).join('\n');
1010
const snapshot = `---
1111
${packageEntries}
1212
---
13-
13+
1414
Snapshot release
1515
`;
1616

0 commit comments

Comments
 (0)