From 9a8671548b69229f8b1f7d1bf6bb5ea9af77d1c7 Mon Sep 17 00:00:00 2001 From: Max Shick Date: Fri, 28 Nov 2025 11:07:55 -0500 Subject: [PATCH 1/2] scoped to org --- .github/workflows/publish-npm.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish-npm.yaml b/.github/workflows/publish-npm.yaml index fb66f29..0efe58c 100644 --- a/.github/workflows/publish-npm.yaml +++ b/.github/workflows/publish-npm.yaml @@ -21,6 +21,7 @@ jobs: with: node-version: "20" registry-url: "https://registry.npmjs.org" + scope: "@tabbridge" - name: Install dependencies run: npm ci From 5de9a3bf0af4d57b83c3df5332ba6e7654028e77 Mon Sep 17 00:00:00 2001 From: Max Shick Date: Fri, 28 Nov 2025 11:13:46 -0500 Subject: [PATCH 2/2] swapping to release over publish --- .github/workflows/publish-npm.yaml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish-npm.yaml b/.github/workflows/publish-npm.yaml index 0efe58c..28c7350 100644 --- a/.github/workflows/publish-npm.yaml +++ b/.github/workflows/publish-npm.yaml @@ -1,9 +1,8 @@ name: Publish useMultiTabDetection to NPM on: - push: - branches: - - main + release: + types: [published] jobs: publish: @@ -22,7 +21,6 @@ jobs: node-version: "20" registry-url: "https://registry.npmjs.org" scope: "@tabbridge" - - name: Install dependencies run: npm ci @@ -53,6 +51,18 @@ jobs: env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: Create package tarball + if: steps.check-version.outputs.skip == 'false' + run: npm pack + + - name: Upload package to release + if: steps.check-version.outputs.skip == 'false' + uses: softprops/action-gh-release@v1 + with: + files: "*.tgz" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Skip publishing if: steps.check-version.outputs.skip == 'true' run: echo "Skipping publish - version already exists on NPM"