Ruci-Cmd Release #73
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Ruci-Cmd Release | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: "Release Tag" | |
| required: true | |
| type: string | |
| without_cross: | |
| required: false | |
| default: "false" | |
| description: "by default it will build with cross. Set it to true to build without cross" | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build-cross: | |
| if: ${{ inputs.without_cross == 'false' }} | |
| permissions: write-all | |
| uses: ./.github/workflows/build_ruci_cmd_cross.yml | |
| build-ubuntu: | |
| permissions: write-all | |
| runs-on: ubuntu-22.04 | |
| env: | |
| RUST_BACKTRACE: full | |
| strategy: | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| run: | | |
| rustup set profile minimal | |
| rustup toolchain install stable | |
| rustup default stable | |
| rustup override set stable | |
| rustup target add --toolchain stable x86_64-unknown-linux-gnu | |
| - name: Build x86_64-unknown-linux-gnu | |
| run: | | |
| cd crates/ruci-cmd | |
| make BUILD_VERSION=${{ inputs.tag || github.ref_name }} BUILD_TRIPLET=x86_64-unknown-linux-gnu | |
| - name: Upload Github Assets | |
| uses: softprops/action-gh-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| files: crates/ruci-cmd/dist/*.tar.xz | |
| tag_name: ${{ inputs.tag || github.ref_name }} | |
| build-unix: | |
| permissions: write-all | |
| runs-on: macos-latest | |
| env: | |
| RUST_BACKTRACE: full | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| target: | |
| - x86_64-apple-darwin | |
| - aarch64-apple-darwin | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install GNU tar | |
| run: | | |
| brew install gnu-tar | |
| echo "/usr/local/opt/gnu-tar/libexec/gnubin" >> $GITHUB_PATH | |
| - name: Install Rust | |
| run: | | |
| rustup set profile minimal | |
| rustup toolchain install stable | |
| rustup default stable | |
| rustup override set stable | |
| rustup target add --toolchain stable ${{ matrix.target }} | |
| - name: Build ${{ matrix.target }} | |
| run: | | |
| cd crates/ruci-cmd | |
| make BUILD_VERSION=${{ inputs.tag || github.ref_name }} BUILD_TRIPLET=${{ matrix.target }} | |
| - name: Upload Github Assets | |
| uses: softprops/action-gh-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| files: crates/ruci-cmd/dist/*.tar.xz | |
| tag_name: ${{ inputs.tag || github.ref_name }} | |
| build-windows: | |
| permissions: write-all | |
| runs-on: windows-latest | |
| env: | |
| RUST_BACKTRACE: full | |
| strategy: | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| run: | | |
| rustup set profile minimal | |
| rustup toolchain install stable | |
| rustup default stable | |
| rustup override set stable | |
| rustup target add --toolchain stable x86_64-pc-windows-msvc | |
| - name: Build x86_64-pc-windows-msvc | |
| run: | | |
| cd crates/ruci-cmd | |
| make exe BUILD_VERSION=${{ inputs.tag || github.ref_name }} BUILD_TRIPLET=x86_64-pc-windows-msvc | |
| - name: Upload Github Assets | |
| uses: softprops/action-gh-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| files: crates/ruci-cmd/dist/*.tar.xz | |
| tag_name: ${{ inputs.tag || github.ref_name }} | |
| build-windows-gnu: | |
| permissions: write-all | |
| runs-on: windows-latest | |
| env: | |
| RUST_BACKTRACE: full | |
| RUSTFLAGS: -Clink-self-contained=yes -Ctarget-feature=+crt-static | |
| strategy: | |
| fail-fast: false | |
| #https://github.com/egor-tensin/setup-mingw/pull/16 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up MinGW | |
| uses: e-t-l/setup-mingw@patch-1 | |
| with: | |
| platform: x64 | |
| - name: Install Rust | |
| run: | | |
| rustup set profile minimal | |
| rustup toolchain install stable-gnu | |
| rustup default stable-x86_64-pc-windows-gnu | |
| rustup target add --toolchain stable x86_64-pc-windows-gnu | |
| - name: Build x86_64-pc-windows-gnu | |
| run: | | |
| cd crates/ruci-cmd | |
| make win_default_target BUILD_VERSION=${{ inputs.tag || github.ref_name }} BUILD_TRIPLET=x86_64-pc-windows-gnu | |
| - name: Upload Github Assets | |
| uses: softprops/action-gh-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| files: crates/ruci-cmd/dist/*.tar.xz | |
| tag_name: ${{ inputs.tag || github.ref_name }} |