diff --git a/.github/workflows/publish-binaries.yml b/.github/workflows/publish-binaries.yml index 67ba40c6..dd793f87 100644 --- a/.github/workflows/publish-binaries.yml +++ b/.github/workflows/publish-binaries.yml @@ -44,6 +44,11 @@ jobs: - name: Install Rust run: rustup update stable --no-self-update && rustup default stable && rustup target add ${{ matrix.rust-target }} - run: cargo build --release --target ${{ matrix.rust-target }} + env: + CARGO_PROFILE_RELEASE_PANIC: abort + CARGO_PROFILE_RELEASE_LTO: true + CARGO_PROFILE_RELEASE_CODEGEN_UNITS: 1 + CARGO_PROFILE_RELEASE_STRIP: debuginfo - run: mv ./target/${{ matrix.rust-target }}/release/cargo-component.exe ./target/${{ matrix.rust-target }}/release/cargo-component-${{ matrix.rust-target }} if: matrix.os == 'windows-latest' - run: mv ./target/${{ matrix.rust-target }}/release/cargo-component ./target/${{ matrix.rust-target }}/release/cargo-component-${{ matrix.rust-target }} @@ -66,7 +71,6 @@ jobs: os: macos-latest - rust-target: x86_64-pc-windows-gnu os: windows-latest - permissions: contents: write steps: @@ -74,6 +78,11 @@ jobs: - name: Install Rust run: rustup update stable --no-self-update && rustup default stable && rustup target add ${{ matrix.rust-target }} - run: cargo build --release --target ${{ matrix.rust-target }} + env: + CARGO_PROFILE_RELEASE_PANIC: abort + CARGO_PROFILE_RELEASE_LTO: true + CARGO_PROFILE_RELEASE_CODEGEN_UNITS: 1 + CARGO_PROFILE_RELEASE_STRIP: debuginfo - run: mv ./target/${{ matrix.rust-target }}/release/cargo-component.exe ./target/${{ matrix.rust-target }}/release/cargo-component-${{ matrix.rust-target }} if: matrix.os == 'windows-latest' - run: mv ./target/${{ matrix.rust-target }}/release/cargo-component ./target/${{ matrix.rust-target }}/release/cargo-component-${{ matrix.rust-target }}