Skip to content

Refactor: Comment out workdlow_dispatch #14

Refactor: Comment out workdlow_dispatch

Refactor: Comment out workdlow_dispatch #14

Workflow file for this run

name: Cross Build
on:
# workflow_dispatch: # Enables manual triggering
push:
tags:
- "v*" # Matches tags like v1.0.0, v2.3.4, etc.
jobs:
build-windows:
runs-on: ubuntu-latest # Ubuntu runner for Linux and Windows builds
steps:
# Checkout the code
- name: Checkout repository
uses: actions/checkout@v3
# Install Rust
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
override: true # Set as the default Rust version
toolchain: stable
# Install `cross`
- name: Install cross
run: cargo install cross --git https://github.com/cross-rs/cross
# Build for Windows
- name: Build for Windows (x86_64-pc-windows-gnu)
run: cross build --release --target x86_64-pc-windows-gnu
# Upload Windows binary as artifact
- name: Upload Windows binary
uses: actions/upload-artifact@v3
with:
name: windows-binary
path: target/x86_64-pc-windows-gnu/release/jobshell.exe
build-macos:
runs-on: macos-latest # macOS runner for macOS builds
steps:
# Checkout the code
- name: Checkout repository
uses: actions/checkout@v3
# Install Rust
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
override: true # Set as the default Rust version
toolchain: stable
# Install required targets for macOS
- name: Install macOS targets
run: |
rustup target add x86_64-apple-darwin
rustup target add aarch64-apple-darwin
# Build for macOS (x86_64)
- name: Build for macOS (x86_64-apple-darwin)
run: cargo build --release --target x86_64-apple-darwin
# Upload macOS (x86_64) binary as artifact
- name: Upload macOS (x86_64) binary
uses: actions/upload-artifact@v3
with:
name: jobshell-macos-x86_64-binary
path: target/x86_64-apple-darwin/release/jobshell
# Build for macOS (aarch64)
- name: Build for macOS (aarch64-apple-darwin)
run: cargo build --release --target aarch64-apple-darwin
# Upload macOS (aarch64) binary as artifact
- name: Upload macOS (aarch64) binary
uses: actions/upload-artifact@v3
with:
name: jobshell-macos-aarch64-binary
path: target/aarch64-apple-darwin/release/jobshell