This repository was archived by the owner on Dec 12, 2025. It is now read-only.
fix: Correct executable name in CI workflow compression and publish s… #5
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: CI | |
| on: | |
| push: | |
| paths: | |
| - .github/workflows/** | |
| - src/** | |
| - Cargo.* | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| release: | |
| strategy: | |
| matrix: | |
| platform: | |
| - os-name: Linux-i686 | |
| runs-on: ubuntu-latest | |
| target: i686-unknown-linux-musl | |
| - os-name: Linux-x86_64 | |
| runs-on: ubuntu-latest | |
| target: x86_64-unknown-linux-musl | |
| - os-name: Linux-aarch64 | |
| runs-on: ubuntu-latest | |
| target: aarch64-unknown-linux-musl | |
| - os-name: Linux-riscv64 | |
| runs-on: ubuntu-latest | |
| target: riscv64gc-unknown-linux-gnu | |
| skip-upx: true | |
| - os-name: Windows-i686 | |
| runs-on: windows-latest | |
| target: i686-pc-windows-msvc | |
| - os-name: Windows-x86_64 | |
| runs-on: windows-latest | |
| target: x86_64-pc-windows-msvc | |
| - os-name: Windows-aarch64 | |
| runs-on: windows-latest | |
| target: aarch64-pc-windows-msvc | |
| skip-upx: true | |
| - os-name: macOS-x86_64 | |
| runs-on: macOS-latest | |
| target: x86_64-apple-darwin | |
| - os-name: macOS-aarch64 | |
| runs-on: macOS-latest | |
| target: aarch64-apple-darwin | |
| name: Release - ${{ matrix.platform.os-name }} | |
| runs-on: ${{ matrix.platform.runs-on }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Build binary | |
| uses: houseabsolute/actions-rust-cross@v1 | |
| with: | |
| target: ${{ matrix.platform.target }} | |
| args: "--locked --release" | |
| strip: false | |
| - name: Setup UPX for Linux platform | |
| run: sudo apt install -y upx | |
| if: ${{ matrix.platform.runs-on == 'ubuntu-latest' }} | |
| - name: Setup UPX for Windows platform | |
| run: choco install upx -y | |
| if: ${{ matrix.platform.runs-on == 'windows-latest' }} | |
| # - name: Setup UPX for MacOS platform | |
| # run: brew install upx | |
| # if: ${{ matrix.platform.runs-on == 'macOS-latest' }} | |
| - name: Compress binary target for Linux platform | |
| run: upx --best --lzma -q target/${{ matrix.platform.target }}/release/ai-commit | |
| if: ${{ matrix.platform.runs-on == 'ubuntu-latest' && !matrix.platform.skip-upx }} | |
| - name: Compress binary target for Windows platform | |
| run: upx --best --lzma -q target/${{ matrix.platform.target }}/release/ai-commit.exe | |
| if: ${{ matrix.platform.runs-on == 'windows-latest' && !matrix.platform.skip-upx }} | |
| # - name: Compress binary target for MacOS platform | |
| # run: upx --best --lzma -q target/${{ matrix.platform.target }}/release/ai-commit | |
| # if: ${{ matrix.platform.runs-on == 'macOS-latest' && !matrix.platform.skip-upx }} | |
| - name: Publish artifacts and release | |
| uses: houseabsolute/actions-rust-release@v0 | |
| with: | |
| executable-name: ai-commit | |
| target: ${{ matrix.platform.target }} | |
| changes-file: release-notes.md |