From d4affc7adbf6ccf74f213dca679eebc546955059 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 28 Nov 2025 10:09:03 +0000 Subject: [PATCH 1/3] Initial plan From 1510a113994c0afab45c14925527ce136db1f3f3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 28 Nov 2025 10:14:21 +0000 Subject: [PATCH 2/3] Add cross-platform release workflow for Win/Mac/Linux builds Co-authored-by: Steake <530040+Steake@users.noreply.github.com> --- .github/workflows/release.yml | 131 ++++++++++++++++++++++++++++++++++ 1 file changed, 131 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..ae72477 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,131 @@ +name: Release + +on: + release: + types: [created] + workflow_dispatch: + +env: + CARGO_TERM_COLOR: always + RUST_BACKTRACE: 1 + +jobs: + build: + name: Build ${{ matrix.target }} + runs-on: ${{ matrix.os }} + permissions: + contents: read + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-latest + target: x86_64-unknown-linux-gnu + artifact_name: bitcell-linux-x86_64 + - os: macos-latest + target: x86_64-apple-darwin + artifact_name: bitcell-macos-x86_64 + - os: macos-latest + target: aarch64-apple-darwin + artifact_name: bitcell-macos-aarch64 + - os: windows-latest + target: x86_64-pc-windows-msvc + artifact_name: bitcell-windows-x86_64 + + steps: + - uses: actions/checkout@v4 + + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + with: + targets: ${{ matrix.target }} + + - name: Cache cargo registry + uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-${{ matrix.target }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-${{ matrix.target }}-cargo- + + - name: Build release binaries + run: cargo build --release --target ${{ matrix.target }} + + - name: Create artifact directory + shell: bash + run: mkdir -p artifacts + + - name: Copy binaries (Unix) + if: runner.os != 'Windows' + shell: bash + run: | + cp target/${{ matrix.target }}/release/bitcell-node artifacts/ + cp target/${{ matrix.target }}/release/bitcell-admin artifacts/ + + - name: Copy binaries (Windows) + if: runner.os == 'Windows' + shell: bash + run: | + cp target/${{ matrix.target }}/release/bitcell-node.exe artifacts/ + cp target/${{ matrix.target }}/release/bitcell-admin.exe artifacts/ + + - name: Create archive (Unix) + if: runner.os != 'Windows' + shell: bash + run: | + cd artifacts + tar -czvf ../${{ matrix.artifact_name }}.tar.gz ./* + cd .. + + - name: Create archive (Windows) + if: runner.os == 'Windows' + shell: pwsh + run: | + Compress-Archive -Path artifacts/* -DestinationPath ${{ matrix.artifact_name }}.zip + + - name: Upload artifact (Unix) + if: runner.os != 'Windows' + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.artifact_name }} + path: ${{ matrix.artifact_name }}.tar.gz + retention-days: 7 + + - name: Upload artifact (Windows) + if: runner.os == 'Windows' + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.artifact_name }} + path: ${{ matrix.artifact_name }}.zip + retention-days: 7 + + release: + name: Upload Release Assets + needs: build + runs-on: ubuntu-latest + if: github.event_name == 'release' + permissions: + contents: write + + steps: + - name: Download all artifacts + uses: actions/download-artifact@v4 + with: + path: artifacts + + - name: Display structure of downloaded files + run: ls -la artifacts/ + + - name: Upload release assets + uses: softprops/action-gh-release@v2 + with: + files: | + artifacts/bitcell-linux-x86_64/bitcell-linux-x86_64.tar.gz + artifacts/bitcell-macos-x86_64/bitcell-macos-x86_64.tar.gz + artifacts/bitcell-macos-aarch64/bitcell-macos-aarch64.tar.gz + artifacts/bitcell-windows-x86_64/bitcell-windows-x86_64.zip + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 4c292f6d30df5bd63793f001530e1f11701cccef Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 28 Nov 2025 12:02:40 +0000 Subject: [PATCH 3/3] Apply review suggestions: use macos-14 for ARM64, target specific packages, simplify tar command Co-authored-by: Steake <530040+Steake@users.noreply.github.com> --- .github/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ae72477..5649f23 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,7 +25,7 @@ jobs: - os: macos-latest target: x86_64-apple-darwin artifact_name: bitcell-macos-x86_64 - - os: macos-latest + - os: macos-14 # Native ARM64 runner target: aarch64-apple-darwin artifact_name: bitcell-macos-aarch64 - os: windows-latest @@ -52,7 +52,7 @@ jobs: ${{ runner.os }}-${{ matrix.target }}-cargo- - name: Build release binaries - run: cargo build --release --target ${{ matrix.target }} + run: cargo build --release --target ${{ matrix.target }} -p bitcell-node -p bitcell-admin - name: Create artifact directory shell: bash @@ -77,7 +77,7 @@ jobs: shell: bash run: | cd artifacts - tar -czvf ../${{ matrix.artifact_name }}.tar.gz ./* + tar -czvf ../${{ matrix.artifact_name }}.tar.gz * cd .. - name: Create archive (Windows)