Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .github/workflows/naga-health-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.naga_branch || github.ref }}
repository: LIT-Protocol/js-sdk
ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.naga_branch || 'naga' }}
fetch-depth: 1

- name: Install rust
Expand All @@ -67,6 +68,17 @@ jobs:
corepack enable
corepack prepare pnpm@9.15.0 --activate

- name: Print repo, branch and lockfile context
run: |
echo "Repo: $GITHUB_REPOSITORY"
echo "Checked out repo: LIT-Protocol/js-sdk"
echo "Ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.naga_branch || 'naga' }}"
echo "Checked out ref: $(git rev-parse --abbrev-ref HEAD)"
echo "Current commit: $(git rev-parse HEAD)"
echo "Node: $(node -v)"
echo "PNPM: $(pnpm --version)"
[ -f pnpm-lock.yaml ] && echo "pnpm-lock.yaml present" || echo "pnpm-lock.yaml missing"

- name: Install dependencies
run: pnpm install --frozen-lockfile

Expand Down
18 changes: 16 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,18 @@ jobs:
cache: 'pnpm'
cache-dependency-path: pnpm-lock.yaml

- name: Print repo and branch context
run: |
echo "Repo: $GITHUB_REPOSITORY"
echo "Head branch: ${{ github.event.workflow_run.head_branch }}"
echo "Workflow head_sha: ${{ github.event.workflow_run.head_sha }}"
echo "Checked out ref: $(git rev-parse --abbrev-ref HEAD)"
echo "Current commit: $(git rev-parse HEAD)"
echo "Node: $(node -v)"
echo "PNPM: $(pnpm --version)"
[ -f pnpm-lock.yaml ] && echo "pnpm-lock.yaml present" || echo "pnpm-lock.yaml missing"
[ -d .changeset ] && echo ".changeset present" || echo ".changeset missing"

- name: Install project dependencies
run: pnpm install --frozen-lockfile

Expand All @@ -92,8 +104,10 @@ jobs:
id: branch_tip
run: |
BRANCH="${{ github.event.workflow_run.head_branch }}"
git fetch origin "$BRANCH"
echo "sha=$(git rev-parse \"origin/$BRANCH\")" >> "$GITHUB_OUTPUT"
git fetch --no-tags --prune --depth=1 origin "$BRANCH"
TIP_SHA=$(git rev-parse --verify "origin/$BRANCH^{commit}")
Copy link

Copilot AI Oct 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The ^{commit} suffix in git rev-parse --verify \"origin/$BRANCH^{commit}\" may be unnecessary since git rev-parse on a branch reference already resolves to the commit SHA. Consider simplifying to git rev-parse --verify \"origin/$BRANCH\" for better readability.

Suggested change
TIP_SHA=$(git rev-parse --verify "origin/$BRANCH^{commit}")
TIP_SHA=$(git rev-parse --verify "origin/$BRANCH")

Copilot uses AI. Check for mistakes.
echo "Resolved branch tip SHA: $TIP_SHA"
echo "sha=$TIP_SHA" >> "$GITHUB_OUTPUT"

- name: Create Release Pull Request or Publish to npm
id: changesets
Expand Down