diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 48dbaea..1529ebb 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -2,8 +2,7 @@ name: Rust Build and Release on: push: - branches: [ "master" ] - + branches: ["master"] env: CARGO_TERM_COLOR: always @@ -14,7 +13,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ ubuntu-latest, windows-latest, macos-latest ] + os: [ubuntu-latest, windows-latest, macos-latest] include: - os: ubuntu-latest target: x86_64-unknown-linux-gnu @@ -39,6 +38,12 @@ jobs: command: build args: --release --target ${{ matrix.target }} + - name: Debug - List build directory + shell: bash + run: | + echo "Listing target/${{ matrix.target }}/release directory:" + ls -la target/${{ matrix.target }}/release + - name: Package Binary shell: bash run: | @@ -46,10 +51,31 @@ jobs: if [ "${{ matrix.os }}" = "windows-latest" ]; then binary_name="${binary_name}.exe" fi - tar -czf "${binary_name}-${{ matrix.target }}.tar.gz" -C "target/${{ matrix.target }}/release" "${binary_name}" + echo "Binary name: ${binary_name}" + echo "Packaging binary from: target/${{ matrix.target }}/release/${binary_name}" + if [ -f "target/${{ matrix.target }}/release/${binary_name}" ]; then + echo "Binary file exists" + tar -czvf "${binary_name}-${{ matrix.target }}.tar.gz" -C "target/${{ matrix.target }}/release" "${binary_name}" + echo "Packaging complete" + else + echo "Error: Binary file not found" + exit 1 + fi + + - name: Debug - List workspace + shell: bash + run: | + echo "Listing current directory:" + ls -la - name: Upload Artifact uses: actions/upload-artifact@v4 with: name: merklemap-cli-${{ matrix.target }} path: merklemap-cli-${{ matrix.target }}.tar.gz + + - name: Debug - Check upload + shell: bash + run: | + echo "Checking if tar.gz file exists:" + ls -la merklemap-cli-${{ matrix.target }}.tar.gz || echo "File not found"