chore: bump version to 0.1.3 #31
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: | |
| branches: [main] | |
| tags: ['v*'] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: false | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| check: | |
| name: Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - name: Cache cargo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/ | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check | |
| - name: Clippy | |
| run: cargo clippy --all-targets --all-features -- -D warnings | |
| - name: Run tests | |
| run: cargo test --all-features | |
| build: | |
| name: Build ${{ matrix.target }} | |
| needs: check | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - target: x86_64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| name: linux-x64 | |
| use_cross: false | |
| - target: aarch64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| name: linux-arm64 | |
| use_cross: true | |
| - target: x86_64-apple-darwin | |
| os: macos-latest | |
| name: macos-x64 | |
| use_cross: false | |
| - target: aarch64-apple-darwin | |
| os: macos-latest | |
| name: macos-arm64 | |
| use_cross: false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Install cross | |
| if: matrix.use_cross | |
| run: cargo install cross --git https://github.com/cross-rs/cross | |
| - name: Build release (cross) | |
| if: matrix.use_cross | |
| run: cross build --release --target ${{ matrix.target }} | |
| - name: Build release (cargo) | |
| if: ${{ !matrix.use_cross }} | |
| run: cargo build --release --target ${{ matrix.target }} | |
| - name: Package (Unix) | |
| run: | | |
| mkdir -p dist | |
| cp target/${{ matrix.target }}/release/kaido dist/ | |
| cp target/${{ matrix.target }}/release/kaido-mcp dist/ | |
| cp target/${{ matrix.target }}/release/kaido-shell dist/ 2>/dev/null || true | |
| cd dist && tar -czvf ../kaido-${{ matrix.name }}.tar.gz * | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: kaido-${{ matrix.name }} | |
| path: kaido-${{ matrix.name }}.tar.gz | |
| release: | |
| name: Release | |
| needs: build | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| draft: false | |
| prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc') }} | |
| generate_release_notes: true | |
| files: | | |
| artifacts/**/*.tar.gz | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |