From c73af72340ca802b782d4895c10e39d8e2e4f15a Mon Sep 17 00:00:00 2001 From: ShahanaFarooqui Date: Thu, 26 Feb 2026 11:50:57 -0800 Subject: [PATCH] gl-sdk-napi: Configure npm publishing to only trigger once changes are accepted into the main branch --- .github/workflows/typescript.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/typescript.yml b/.github/workflows/typescript.yml index ab6adbfb9..c65571bc3 100644 --- a/.github/workflows/typescript.yml +++ b/.github/workflows/typescript.yml @@ -6,9 +6,12 @@ on: branches: - main pull_request: {} - release: - types: [created] workflow_dispatch: + inputs: + shouldPublish: + description: 'Publish to NPM' + type: boolean + default: true name: Typescript Library @@ -203,6 +206,7 @@ jobs: name: Publish to NPM runs-on: ubuntu-latest needs: test + if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event_name == 'workflow_dispatch' && inputs.shouldPublish == true) defaults: run: