Skip to content

An AI-powered task-management system you can drop into Cursor, Lovable, Windsurf, Roo, and others.

chore: improve pre-release CI to be able to release more than one release candidate (#1036)

Ralph Khreish2df4f13f653d
diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml
index 430c1aab..1ea3f85d 100644
--- a/.github/workflows/pre-release.yml
+++ b/.github/workflows/pre-release.yml
@@ -16,7 +16,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 20
- cache: 'npm'
+ cache: "npm"
- name: Cache node_modules
uses: actions/cache@v4
@@ -32,10 +32,13 @@ jobs:
run: npm ci
timeout-minutes: 2
- - name: Enter RC mode
+ - name: Enter RC mode (if not already in RC mode)
run: |
- npx changeset pre exit || true
- npx changeset pre enter rc
+ # ensure we’re in the right pre-mode (tag "rc")
+ if [ ! -f .changeset/pre.json ] \
+ || [ "$(jq -r '.tag' .changeset/pre.json 2>/dev/null || echo '')" != "rc" ]; then
+ npx changeset pre enter rc
+ fi
- name: Version RC packages
run: npx changeset version
@@ -51,12 +54,9 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- - name: Exit RC mode
- run: npx changeset pre exit
-
- name: Commit & Push changes
uses: actions-js/push@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
- message: 'chore: rc version bump'
+ message: "chore: rc version bump"