From cae6902cbd94ff65c7ad2337b4e7b9fd674df25c Mon Sep 17 00:00:00 2001 From: anson Date: Fri, 10 Oct 2025 01:09:46 +0100 Subject: [PATCH 1/2] fix(ci): release workflow uses branch tip and tip SHA --- .github/workflows/release.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b4bfae112..023dd99a5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,6 +25,7 @@ jobs: if: >- ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'push' && + github.repository == 'LIT-Protocol/js-sdk' && (github.event.workflow_run.head_branch == 'naga' || github.event.workflow_run.head_branch == 'canary-naga') }} # Enable this when we want to implement docker image release @@ -87,6 +88,13 @@ jobs: - name: Build packages run: pnpm run build + - name: Compute branch tip SHA + id: branch_tip + run: | + BRANCH="${{ github.event.workflow_run.head_branch }}" + git fetch origin "$BRANCH" + echo "sha=$(git rev-parse \"origin/$BRANCH\")" >> "$GITHUB_OUTPUT" + - name: Create Release Pull Request or Publish to npm id: changesets uses: changesets/action@v1 @@ -99,6 +107,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} + GITHUB_SHA: ${{ steps.branch_tip.outputs.sha }} # - Was lit-auth-server part of the most recent release? # - Capture published packages From e57be6452a2fc7ab9e142104fd6aa95ca9533ac0 Mon Sep 17 00:00:00 2001 From: anson Date: Fri, 10 Oct 2025 01:22:15 +0100 Subject: [PATCH 2/2] fix(ci): release runs from branch tip; scope naga health-check to js-sdk --- .github/workflows/naga-health-check.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/naga-health-check.yml b/.github/workflows/naga-health-check.yml index 7c4138cbb..2ca25213c 100644 --- a/.github/workflows/naga-health-check.yml +++ b/.github/workflows/naga-health-check.yml @@ -27,6 +27,7 @@ env: jobs: naga-health-check: runs-on: ubuntu-latest + if: ${{ github.repository == 'LIT-Protocol/js-sdk' }} environment: Health Check strategy: fail-fast: false