Skip to content

ci: add CI and release workflows #1

ci: add CI and release workflows

ci: add CI and release workflows #1

Workflow file for this run

name: Release
on:
push:
branches: [main]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
artifact: rollcron-linux-x86_64
- os: macos-latest
target: x86_64-apple-darwin
artifact: rollcron-macos-x86_64
- os: macos-latest
target: aarch64-apple-darwin
artifact: rollcron-macos-aarch64
- os: windows-latest
target: x86_64-pc-windows-msvc
artifact: rollcron-windows-x86_64.exe
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Build
run: cargo build --release --target ${{ matrix.target }}
- name: Rename artifact (Unix)
if: runner.os != 'Windows'
run: mv target/${{ matrix.target }}/release/rollcron ${{ matrix.artifact }}
- name: Rename artifact (Windows)
if: runner.os == 'Windows'
run: mv target/${{ matrix.target }}/release/rollcron.exe ${{ matrix.artifact }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: ${{ matrix.artifact }}