diff --git a/.github/workflows/build-and-publish-bindings.yml b/.github/workflows/build-and-publish-bindings.yml index 1dd0ca149..48aa86297 100644 --- a/.github/workflows/build-and-publish-bindings.yml +++ b/.github/workflows/build-and-publish-bindings.yml @@ -33,6 +33,7 @@ jobs: rust_version: ${{ needs.setup.outputs.rust_version }} publish-ldk-node-go: + if: github.ref_name == 'main' || github.head_ref == 'main' needs: - generate-bindings - build-libraries diff --git a/.github/workflows/build-libraries.yaml b/.github/workflows/build-libraries.yaml index 96ca6b525..838e5852a 100644 --- a/.github/workflows/build-libraries.yaml +++ b/.github/workflows/build-libraries.yaml @@ -13,6 +13,7 @@ jobs: matrix: build: [ { host: ubuntu-20.04, tool: cargo, target: x86_64-unknown-linux-gnu, output: libldk_node.so }, + { host: ubuntu-20.04, tool: cross, target: aarch64-unknown-linux-gnu, output: libldk_node.so }, { host: ubuntu-20.04, tool: cross, target: arm-unknown-linux-gnueabihf, output: libldk_node.so }, { host: windows-2019, tool: cargo, target: x86_64-pc-windows-msvc, output: ldk_node.dll }, { host: macos-12, tool: cargo, target: x86_64-apple-darwin, output: libldk_node.dylib }, diff --git a/.github/workflows/publish-bindings-go.yaml b/.github/workflows/publish-bindings-go.yaml index 0e1abb9df..1dfe6ff88 100644 --- a/.github/workflows/publish-bindings-go.yaml +++ b/.github/workflows/publish-bindings-go.yaml @@ -6,29 +6,18 @@ on: LDK_NODE_GO_DEPLOY_KEY: required: true -env: - LDK_BRANCH_NAME: ${{ github.head_ref || github.ref_name }} - TARGET_BRANCH_PREFIX: "publish-" - jobs: publish-ldk-node-go: runs-on: ubuntu-20.04 - steps: - - name: Set target branch name - run: | - if [ "${{ env.LDK_BRANCH_NAME }}" != "main" ]; then - echo "TARGET_BRANCH=${{ env.TARGET_BRANCH_PREFIX }}${{ env.LDK_BRANCH_NAME }}" >> $GITHUB_ENV - else - echo "TARGET_BRANCH=master" >> $GITHUB_ENV - fi + if: github.ref_name == 'main' || github.head_ref == 'main' + steps: - name: Checkout ldk-node-go uses: actions/checkout@v4 with: repository: getAlby/ldk-node-go ssh-key: ${{ secrets.LDK_NODE_GO_DEPLOY_KEY }} - ref: ${{ env.TARGET_BRANCH }} - name: Download bindings uses: actions/download-artifact@v4 @@ -42,6 +31,12 @@ jobs: name: ldk-node-x86_64-unknown-linux-gnu path: ldk_node/x86_64-unknown-linux-gnu + - name: Download Linux aarch64 libs + uses: actions/download-artifact@v4 + with: + name: ldk-node-aarch64-unknown-linux-gnu + path: ldk_node/aarch64-unknown-linux-gnu + - name: Download Linux ARM libs uses: actions/download-artifact@v4 with: @@ -68,8 +63,9 @@ jobs: 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/aarch64-unknown-linux-gnu/libldk_node.so git add ldk_node/arm-unknown-linux-gnueabihf/libldk_node.so git add ldk_node/x86_64-pc-windows-msvc/ldk_node.dll git add ldk_node/universal-macos/libldk_node.dylib git commit -m "Update bindings." - git push origin ${{ env.TARGET_BRANCH }} + git push