Skip to content

Commit 578515c

Browse files
authored
Merge pull request #940 from LIT-Protocol/fix/ci-naga-release-and-e2e-tests-failing
fix(ci): release runs on branch tip; health-check uses js-sdk@naga; a…
2 parents 8023a77 + 707da3a commit 578515c

File tree

2 files changed

+29
-3
lines changed

2 files changed

+29
-3
lines changed

.github/workflows/naga-health-check.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ jobs:
4141
- name: Checkout repository
4242
uses: actions/checkout@v4
4343
with:
44-
ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.naga_branch || github.ref }}
44+
repository: LIT-Protocol/js-sdk
45+
ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.naga_branch || 'naga' }}
4546
fetch-depth: 1
4647

4748
- name: Install rust
@@ -67,6 +68,17 @@ jobs:
6768
corepack enable
6869
corepack prepare [email protected] --activate
6970
71+
- name: Print repo, branch and lockfile context
72+
run: |
73+
echo "Repo: $GITHUB_REPOSITORY"
74+
echo "Checked out repo: LIT-Protocol/js-sdk"
75+
echo "Ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.naga_branch || 'naga' }}"
76+
echo "Checked out ref: $(git rev-parse --abbrev-ref HEAD)"
77+
echo "Current commit: $(git rev-parse HEAD)"
78+
echo "Node: $(node -v)"
79+
echo "PNPM: $(pnpm --version)"
80+
[ -f pnpm-lock.yaml ] && echo "pnpm-lock.yaml present" || echo "pnpm-lock.yaml missing"
81+
7082
- name: Install dependencies
7183
run: pnpm install --frozen-lockfile
7284

.github/workflows/release.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,18 @@ jobs:
7373
cache: 'pnpm'
7474
cache-dependency-path: pnpm-lock.yaml
7575

76+
- name: Print repo and branch context
77+
run: |
78+
echo "Repo: $GITHUB_REPOSITORY"
79+
echo "Head branch: ${{ github.event.workflow_run.head_branch }}"
80+
echo "Workflow head_sha: ${{ github.event.workflow_run.head_sha }}"
81+
echo "Checked out ref: $(git rev-parse --abbrev-ref HEAD)"
82+
echo "Current commit: $(git rev-parse HEAD)"
83+
echo "Node: $(node -v)"
84+
echo "PNPM: $(pnpm --version)"
85+
[ -f pnpm-lock.yaml ] && echo "pnpm-lock.yaml present" || echo "pnpm-lock.yaml missing"
86+
[ -d .changeset ] && echo ".changeset present" || echo ".changeset missing"
87+
7688
- name: Install project dependencies
7789
run: pnpm install --frozen-lockfile
7890

@@ -92,8 +104,10 @@ jobs:
92104
id: branch_tip
93105
run: |
94106
BRANCH="${{ github.event.workflow_run.head_branch }}"
95-
git fetch origin "$BRANCH"
96-
echo "sha=$(git rev-parse \"origin/$BRANCH\")" >> "$GITHUB_OUTPUT"
107+
git fetch --no-tags --prune --depth=1 origin "$BRANCH"
108+
TIP_SHA=$(git rev-parse --verify "origin/$BRANCH^{commit}")
109+
echo "Resolved branch tip SHA: $TIP_SHA"
110+
echo "sha=$TIP_SHA" >> "$GITHUB_OUTPUT"
97111
98112
- name: Create Release Pull Request or Publish to npm
99113
id: changesets

0 commit comments

Comments
 (0)