fix github action #1
Workflow file for this run
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: Release Build | |
| on: | |
| push: | |
| tags: | |
| - "v*" # triggers on v1.0.0, v2.1.3, etc. | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| target: x86_64-unknown-linux-gnu | |
| binary: bsky-firehose | |
| - os: windows-latest | |
| target: x86_64-pc-windows-msvc | |
| binary: bsky-firehose.exe | |
| - os: macos-latest | |
| target: x86_64-apple-darwin | |
| binary: bsky-firehose | |
| - os: macos-latest | |
| target: aarch64-apple-darwin | |
| binary: bsky-firehose | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy, rustfmt | |
| targets: ${{ matrix.target }} | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Format check | |
| run: cargo fmt --check | |
| - name: Clippy | |
| run: cargo clippy -- -D warnings | |
| - run: cargo build --release --target ${{ matrix.target }} | |
| - run: cargo test | |
| - name: Rename binary | |
| shell: bash | |
| run: | | |
| cp target/${{ matrix.target }}/release/${{ matrix.binary }} \ | |
| ${{ matrix.binary }}-${{ matrix.target }} | |
| - name: Upload binary | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: ${{ matrix.binary }}-${{ matrix.target }} |