Skip to content

Commit

Permalink
Check out target branch in ldk-node-go before downloading artifacts.
Browse files Browse the repository at this point in the history
  • Loading branch information
rdmitr committed Jun 12, 2024
1 parent 61a8f64 commit e1eb747
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/publish-bindings-go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@ jobs:
repository: getAlby/ldk-node-go
ssh-key: ${{ secrets.LDK_NODE_GO_DEPLOY_KEY }}

- name: Prepare git
run: |
git config --global user.email "[email protected]"
git config --global user.name "github-actions"
git config --global push.autoSetupRemote true
if [ "${{ env.LDK_BRANCH_NAME }}" != "main" ]; then
git checkout -b ${{ env.TARGET_BRANCH_PREFIX }}${{ env.LDK_BRANCH_NAME }}
git pull origin ${{ env.TARGET_BRANCH_PREFIX }}${{ env.LDK_BRANCH_NAME }} || true
fi
- name: Download bindings
uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -53,13 +63,6 @@ jobs:

- name: Commit and push bindings
run: |
git config --global user.email "[email protected]"
git config --global user.name "github-actions"
git config --global push.autoSetupRemote true
if [ "${{ env.LDK_BRANCH_NAME }}" != "main" ]; then
git checkout -b ${{ env.TARGET_BRANCH_PREFIX }}${{ env.LDK_BRANCH_NAME }}
fi
git pull origin ${{ env.TARGET_BRANCH_PREFIX }}${{ env.LDK_BRANCH_NAME }} || true
git add ldk_node/ldk_node.go ldk_node/ldk_node.h ldk_node/ldk_node.c
git add ldk_node/x86_64-unknown-linux-gnu/libldk_node.so
git add ldk_node/arm-unknown-linux-gnueabihf/libldk_node.so
Expand All @@ -68,7 +71,7 @@ jobs:
git commit -m "Update bindings."
if [ "${{ env.LDK_BRANCH_NAME }}" != "main" ]; then
git push origin ${{ env.TARGET_BRANCH_PREFIX }}${{ env.LDK_BRANCH_NAME }}
git push origin ${{ env.TARGET_BRANCH_PREFIX }}${{ env.LDK_BRANCH_NAME }}
else
git push origin master
git push origin master
fi

0 comments on commit e1eb747

Please sign in to comment.