-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathaction.yml
More file actions
51 lines (41 loc) · 1.56 KB
/
action.yml
File metadata and controls
51 lines (41 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Build RGB Lightning Node
description: Build RGB Lightning Node repository based on commit ID
runs:
using: "composite"
steps:
- name: Checkout main repository
uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 1
- name: Install Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
source "$HOME/.cargo/env"
shell: bash
- name: Clone rgb-lightning-node repository with submodules
run: |
ls
CURRENT_RLN_NODE_COMMIT=$(grep 'CURRENT_RLN_NODE_COMMIT' ./src/utils/constant.py | awk -F'=' '{print $2}' | tr -d ' "' | xargs)
if [ -z "$CURRENT_RLN_NODE_COMMIT" ]; then
echo "❌ Error: CURRENT_RLN_NODE_COMMIT is empty or not found in constant.py"
exit 1
fi
git clone https://github.com/RGB-Tools/rgb-lightning-node --recurse-submodules --shallow-submodules
cd rgb-lightning-node
if ! git checkout ${CURRENT_RLN_NODE_COMMIT}; then
echo "❌ Error: Failed to checkout commit ${CURRENT_RLN_NODE_COMMIT}"
exit 1
fi
git submodule update --init --recursive
shell: bash
- name: Build the rgb-lightning-node binary
working-directory: rgb-lightning-node
run: cargo build --release
shell: bash
- name: Copy rgb-lightning-node binary to root directory
run: |
mkdir -p ln_node_binary
cp rgb-lightning-node/target/release/rgb-lightning-node ln_node_binary
shell: bash