feat: update dependencies (#5) #25
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 and Release Binary | |
| on: | |
| push: | |
| branches: ["main"] | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| include: | |
| - target: x86_64-unknown-linux-musl | |
| os: ubuntu-latest | |
| name: linux-x86_64 | |
| - target: x86_64-apple-darwin | |
| os: macos-latest | |
| name: macos-x86_64 | |
| - target: aarch64-apple-darwin | |
| os: macos-latest | |
| name: macos-aarch64 | |
| - target: x86_64-pc-windows-gnu | |
| os: windows-latest | |
| name: windows-x86_64 | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Build Binary | |
| run: cargo build --release --target ${{ matrix.target }} --locked | |
| env: | |
| MACOSX_DEPLOYMENT_TARGET: ${{ matrix.target == 'x86_64-apple-darwin' && '10.15' || matrix.target == 'aarch64-apple-darwin' && '11.0' || '' }} | |
| - name: Create Release Directory | |
| run: mkdir -p release | |
| - name: Archive Binary (Unix) | |
| if: matrix.os != 'windows-latest' | |
| run: cp target/${{ matrix.target }}/release/creator release/ | |
| - name: Archive Binary (Windows) | |
| if: matrix.os == 'windows-latest' | |
| run: cp target/${{ matrix.target }}/release/creator.exe release/ | |
| - name: Upload Release Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.name }}-release | |
| path: release |