From 2df4f13f653d4bb90dff6b5b698f45c55c9eb0af Mon Sep 17 00:00:00 2001 From: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com> Date: Wed, 23 Jul 2025 19:28:17 +0300 Subject: [PATCH] chore: improve pre-release CI to be able to release more than one release candidate (#1036) * chore: improve pre-release CI to be able to release more than one release candidate * chore: implement requested changes from coderabbit * chore: apply requested changes --- .github/workflows/pre-release.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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"