Skip to content

Stability Fixes, Performance Optimizations, and v1.0.5 Release #8

Stability Fixes, Performance Optimizations, and v1.0.5 Release

Stability Fixes, Performance Optimizations, and v1.0.5 Release #8

Workflow file for this run

name: Build and Release ZecKit CLI
on:
push:
branches:
- main
- m3-implementation
tags:
- 'v*'
pull_request:
branches:
- main
- m3-implementation
permissions:
contents: write
jobs:
create-release:
name: Create GitHub Release
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2
with:
name: Release ${{ github.ref_name }}
draft: false
prerelease: false
generate_release_notes: true
build:
name: Build and Upload Binaries
needs: create-release
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
bin_name: zeckit-linux-x86_64
- os: macos-latest
target: x86_64-apple-darwin
bin_name: zeckit-macos-x86_64
- os: macos-latest
target: aarch64-apple-darwin
bin_name: zeckit-macos-aarch64
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
target: ${{ matrix.target }}
- name: Build CLI (release mode)
run: |
cargo build --release --locked -p zeckit --target ${{ matrix.target }}
- name: Prepare binary + checksum
run: |
# Use different commands for linux vs mac checksums if needed,
# but sha256sum is standard on most runners now.
cp target/${{ matrix.target }}/release/zeckit ${{ matrix.bin_name }}
if [[ "${{ matrix.os }}" == "macos-latest" ]]; then
shasum -a 256 ${{ matrix.bin_name }} > ${{ matrix.bin_name }}.sha256
else
sha256sum ${{ matrix.bin_name }} > ${{ matrix.bin_name }}.sha256
fi
- name: Upload to Existing Release
uses: softprops/action-gh-release@v2
with:
files: |
${{ matrix.bin_name }}
${{ matrix.bin_name }}.sha256