Skip to content

Commit 8023a77

Browse files
authored
Merge pull request #939 from LIT-Protocol/fix/ci-release-checkout-branch-tip
Fix/ci release checkout branch tip
2 parents 2dbf070 + e57be64 commit 8023a77

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ env:
2727
jobs:
2828
naga-health-check:
2929
runs-on: ubuntu-latest
30+
if: ${{ github.repository == 'LIT-Protocol/js-sdk' }}
3031
environment: Health Check
3132
strategy:
3233
fail-fast: false

.github/workflows/release.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
if: >-
2626
${{ github.event.workflow_run.conclusion == 'success' &&
2727
github.event.workflow_run.event == 'push' &&
28+
github.repository == 'LIT-Protocol/js-sdk' &&
2829
(github.event.workflow_run.head_branch == 'naga' ||
2930
github.event.workflow_run.head_branch == 'canary-naga') }}
3031
# Enable this when we want to implement docker image release
@@ -87,6 +88,13 @@ jobs:
8788
- name: Build packages
8889
run: pnpm run build
8990

91+
- name: Compute branch tip SHA
92+
id: branch_tip
93+
run: |
94+
BRANCH="${{ github.event.workflow_run.head_branch }}"
95+
git fetch origin "$BRANCH"
96+
echo "sha=$(git rev-parse \"origin/$BRANCH\")" >> "$GITHUB_OUTPUT"
97+
9098
- name: Create Release Pull Request or Publish to npm
9199
id: changesets
92100
uses: changesets/action@v1
@@ -99,6 +107,7 @@ jobs:
99107
env:
100108
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
101109
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
110+
GITHUB_SHA: ${{ steps.branch_tip.outputs.sha }}
102111

103112
# - Was lit-auth-server part of the most recent release?
104113
# - Capture published packages

0 commit comments

Comments
 (0)