Skip to navigation
Compile and publish macOS Rust Binary Releases on GitHub Action
15.08.24
# Compile and publish macOS Rust Binary Releases on GitHub Action ```yaml on: push: branches: ["main"] tags: - '*' # Allows you to run this workflow manually from the Actions tab workflow_dispatch: permissions: contents: write pull-requests: write issues: read packages: none jobs: build_macos_intel: if: github.repository_owner == 'myridia' runs-on: macos-13 steps: - name: get_repository run: | brew install rust rustc-completion - name: checkout repo uses: actions/checkout@v4 - name: list_targets run: | rustup target list rustup target add x86_64-apple-darwin - name: compile macos run: | cargo build --target x86_64-apple-darwin --release - name: list macos binary run: | ls target/x86_64-apple-darwin/release - name: rename macos binary run: | cp target/x86_64-apple-darwin/release/couchy target/x86_64-apple-darwin/release/couchy_macos_intel - name: Upload Macos Intel Binary to release uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} file: 'target/x86_64-apple-darwin/release/couchy_macos_intel' tag: ${{ github.ref }} overwrite: true file_glob: true build_macos_silicon: if: github.repository_owner == 'myridia' runs-on: macos-13 steps: - name: get_repository run: | brew install rust rustc-completion - name: checkout repo uses: actions/checkout@v4 - name: list_targets run: | rustup target list rustup target add x86_64-apple-darwin - name: compile macos run: | cargo build --target x86_64-apple-darwin --release - name: list macos binary run: | ls target/x86_64-apple-darwin/release - name: rename macos binary run: | cp target/x86_64-apple-darwin/release/couchy target/x86_64-apple-darwin/release/couchy_macos_silicon - name: Upload Macos Silicon Binary to release uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} file: 'target/x86_64-apple-darwin/release/couchy_macos_silicon' tag: ${{ github.ref }} overwrite: true file_glob: true ```
https://github.com/myridia/couchy/tree/main/.github/workflows
Reply
Anonymous
Information Epoch 1752989726
Think parallel.
Home
Notebook
Contact us