cargo-sweep icon indicating copy to clipboard operation
cargo-sweep copied to clipboard

Release binaries

Open Madoshakalaka opened this issue 2 years ago • 2 comments

Since most likely this tool will get used in CI, it's really optimal to include built binaries in the releases.

and advise users to download binaries in the following way wget -qO- https://github.com/holmgr/cargo-sweep/releases/download/${VERSION}/cargo-sweep-x86_64-unknown-linux-gnu.tar.gz | tar -xzf-

trunk is an excellent reference to the CI setup for prebuilt binaries.

Madoshakalaka avatar Jan 03 '22 05:01 Madoshakalaka

In the time being, I recommend using the following github action to build the binary and commit to your repo peoriodically or on manual trigger:

name: Build Cargo Sweep Binary

on:
  schedule:
    # friday noon
    - cron: '0 12 * * 5'
  workflow_dispatch:
    
env:
  CARGO_TERM_COLOR: always

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - name: Build
      run: cargo install cargo-sweep
    - uses: actions/checkout@v2
    - name: Transfer Binary
      run: 'mv ~/.cargo/bin/cargo-sweep YOUR/PATH/TO/CI-BIN'
    - name: Commit Binary
      uses: stefanzweifel/git-auto-commit-action@v4
      with:
        commit_message: "🤖 build cargo-sweep binary for ci use"

Madoshakalaka avatar Jan 03 '22 05:01 Madoshakalaka

Consider setting up cargo-bininstall too, after the CI is setup

Madoshakalaka avatar Jan 05 '22 08:01 Madoshakalaka

Duplicate of https://github.com/holmgr/cargo-sweep/issues/28

jyn514 avatar Dec 26 '22 23:12 jyn514