Build and Release Binaries #4
This file contains 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 Binaries | |
on: | |
workflow_dispatch: | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
name: Build Linux Binaries | |
strategy: | |
matrix: | |
target: [x86_64-unknown-linux-musl, aarch64-unknown-linux-musl] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
- uses: actions/setup-python@v5 | |
- uses: extractions/setup-just@v2 | |
- name: Install cargo-zigbuild | |
run: pip install cargo-zigbuild | |
- name: Build project for ${{ matrix.target }} | |
run: just build ${{ matrix.target }} | |
- name: Upload artifact for ${{ matrix.target }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: "${{ matrix.target }}-git-ce" | |
path: target/${{ matrix.target }}/release/git-ce | |
retention-days: 7 | |
build-mac: | |
runs-on: macos-latest | |
name: Build macOS binaries | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
- uses: actions/setup-python@v5 | |
- uses: extractions/setup-just@v2 | |
- name: Install cargo-zigbuild | |
run: pip install cargo-zigbuild | |
- name: Install zig | |
uses: goto-bus-stop/setup-zig@v2 | |
- name: Build project for universal2-apple-darwin | |
run: just build universal2-apple-darwin | |
- name: Upload artifact for universal2-apple-darwin | |
uses: actions/upload-artifact@v4 | |
with: | |
name: "universal2-apple-darwin-git-ce" | |
path: target/universal2-apple-darwin/release/git-ce | |
retention-days: 7 | |