Skip to content

Commit 961d7f9

Browse files
committed
Fix windows build
1 parent 359fa14 commit 961d7f9

File tree

1 file changed

+30
-7
lines changed

1 file changed

+30
-7
lines changed

.github/workflows/rust.yml

+30-7
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ name: Rust Build and Release
22

33
on:
44
push:
5-
branches: [ "master" ]
6-
5+
branches: ["master"]
76

87
env:
98
CARGO_TERM_COLOR: always
@@ -14,7 +13,7 @@ jobs:
1413
runs-on: ${{ matrix.os }}
1514
strategy:
1615
matrix:
17-
os: [ ubuntu-latest, windows-latest, macos-latest ]
16+
os: [ubuntu-latest, windows-latest, macos-latest]
1817
include:
1918
- os: ubuntu-latest
2019
target: x86_64-unknown-linux-gnu
@@ -39,14 +38,38 @@ jobs:
3938
command: build
4039
args: --release --target ${{ matrix.target }}
4140

42-
- name: Package Binary
41+
- name: Debug - List build directory
4342
shell: bash
4443
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"
4650
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
4866
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
5073
5174
- name: Upload Artifact
5275
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)