Updates. #14
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: build macOS | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| - release/* | |
| pull_request: | |
| jobs: | |
| build: | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v6 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: x86_64-apple-darwin | |
| - name: Get package name and version of the crate | |
| id: metadata | |
| run: | | |
| NAME=$(cargo metadata --no-deps --format-version=1 | jq -r '.packages[0].name') | |
| echo "name=$NAME" >> $GITHUB_OUTPUT | |
| VERSION=$(cargo metadata --no-deps --format-version=1 | jq -r '.packages[0].version') | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| - name: Build release binary | |
| run: cargo build --release --target=x86_64-apple-darwin | |
| - name: Upload binary | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: ${{ steps.metadata.outputs.name }}-v${{ steps.metadata.outputs.version }}-x86_64-apple-darwin | |
| path: target/x86_64-apple-darwin/release/${{ steps.metadata.outputs.name }} |