@@ -2,8 +2,7 @@ name: Rust Build and Release
2
2
3
3
on :
4
4
push :
5
- branches : [ "master" ]
6
-
5
+ branches : ["master"]
7
6
8
7
env :
9
8
CARGO_TERM_COLOR : always
14
13
runs-on : ${{ matrix.os }}
15
14
strategy :
16
15
matrix :
17
- os : [ ubuntu-latest, windows-latest, macos-latest ]
16
+ os : [ubuntu-latest, windows-latest, macos-latest]
18
17
include :
19
18
- os : ubuntu-latest
20
19
target : x86_64-unknown-linux-gnu
@@ -39,14 +38,38 @@ jobs:
39
38
command : build
40
39
args : --release --target ${{ matrix.target }}
41
40
42
- - name : Package Binary
41
+ - name : Debug - List build directory
43
42
shell : bash
44
43
run : |
45
- binary_name="merklemap-cli"
44
+ echo "Listing target/${{ matrix.target }}/release directory:"
45
+ ls -la target/${{ matrix.target }}/release
46
+
47
+ - name : Set binary name
48
+ run : |
49
+ BINARY_NAME="merklemap-cli"
46
50
if [ "${{ matrix.os }}" = "windows-latest" ]; then
47
- binary_name="${binary_name}.exe"
51
+ BINARY_NAME="${BINARY_NAME}.exe"
52
+ fi
53
+ echo "BINARY_NAME=${BINARY_NAME}" >> $GITHUB_ENV
54
+
55
+ - name : Package Binary
56
+ shell : bash
57
+ run : |
58
+ echo "Packaging binary from: target/${{ matrix.target }}/release/${BINARY_NAME}"
59
+ if [ -f "target/${{ matrix.target }}/release/${BINARY_NAME}" ]; then
60
+ echo "Binary file exists"
61
+ tar -czvf "${BINARY_NAME}-${{ matrix.target }}.tar.gz" -C "target/${{ matrix.target }}/release" "${BINARY_NAME}"
62
+ echo "Packaging complete"
63
+ else
64
+ echo "Error: Binary file not found"
65
+ exit 1
48
66
fi
49
- tar -czf "${binary_name}-${{ matrix.target }}.tar.gz" -C "target/${{ matrix.target }}/release" "${binary_name}"
67
+
68
+ - name : Debug - List workspace
69
+ shell : bash
70
+ run : |
71
+ echo "Listing current directory:"
72
+ ls -la
50
73
51
74
- name : Upload Artifact
52
75
uses : actions/upload-artifact@v4
0 commit comments