-
Notifications
You must be signed in to change notification settings - Fork 279
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(repo): Introduce canary releases from main
The main branch will produce canary releases until the next major version is ready for release. To produce a staging and production release, open a PR from the clerk-v4 branch.
- Loading branch information
Showing
4 changed files
with
62 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
--- | ||
|
||
Introduce `@canary` releases and change current LTS branch to `clerk-v4` to be used as | ||
base branch for `@staging` and `@latest` releases until next major version is stable. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Canary release | ||
run-name: Canary release from ${{ github.ref_name }} | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
canary-release: | ||
if: ${{ github.repository == 'clerkinc/javascript' }} | ||
runs-on: ${{ vars.RUNNER_LARGE }} | ||
env: | ||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | ||
TURBO_TEAM: ${{ vars.TURBO_TEAM }} | ||
TURBO_REMOTE_ONLY: true | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup | ||
uses: ./.github/actions/setup | ||
|
||
- name: Version packages for canary | ||
id: version-packages | ||
run: npm run version:canary | tail -1 >> "$GITHUB_OUTPUT" | ||
|
||
- name: Canary release | ||
if: steps.version-packages.outputs.success == '1' | ||
run: npm run release:canary | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env zx | ||
|
||
import 'zx/globals'; | ||
|
||
import { constants } from './common.mjs'; | ||
|
||
await $`npx json -I -f ${constants.ChangesetConfigFile} -e "this.changelog = false"`; | ||
|
||
const res = await $`npx changeset version --snapshot canary`; | ||
const success = !res.stderr.includes('No unreleased changesets found'); | ||
|
||
await $`git checkout HEAD -- ${constants.ChangesetConfigFile}`; | ||
|
||
if (success) { | ||
echo('success=1'); | ||
} else { | ||
echo('success=0'); | ||
} |