From ec41d30cd36ce50ce0a4677a62b7d77d95918835 Mon Sep 17 00:00:00 2001 From: sanjibdevnathlabs Date: Fri, 13 Mar 2026 14:40:33 +0530 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor(ci):=20trigger=20?= =?UTF-8?q?release=20after=20CI=20passes=20instead=20of=20running=20redund?= =?UTF-8?q?ant=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 38 +++++------------------------------ 1 file changed, 5 insertions(+), 33 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 13b8b0d..3caf91b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,22 +1,20 @@ name: Release & Publish on: - push: + workflow_run: + workflows: [CI] + types: [completed] branches: [main] - paths-ignore: - - '*.md' - - 'docs/**' - - '.github/workflows/ci.yml' permissions: contents: write id-token: write jobs: - # Gate: only release if CI passed and there are releasable commits check: name: Check for releasable commits runs-on: ubuntu-latest + if: github.event.workflow_run.conclusion == 'success' outputs: bump: ${{ steps.bump.outputs.bump }} new_version: ${{ steps.bump.outputs.new_version }} @@ -116,35 +114,9 @@ jobs: echo "CHANGELOG_EOF" } >> "$GITHUB_OUTPUT" - test: - name: Pre-release tests - needs: check - if: needs.check.outputs.should_release == 'true' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: '20.x' - cache: 'npm' - - - name: Install dependencies - run: npm ci - - - name: Type check - run: npm run type-check - - - name: Build - run: npm run build - - - name: Unit & integration tests - run: npm test - release: name: Version bump & release - needs: [check, test] + needs: check if: needs.check.outputs.should_release == 'true' runs-on: ubuntu-latest outputs: