Skip to content

build

build #338

Workflow file for this run

name: build
on:
push:
pull_request:
schedule:
- cron: "51 3 * * 6" # Runs at 03:51, only on Saturday
jobs:
build:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: ["ubuntu", "macos", "windows"]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: crystal-lang/install-crystal@v1
with:
crystal: latest
- name: Ubuntu - Install libreadline-dev
if: matrix.os == 'ubuntu'
run: sudo apt-get update && sudo apt-get install -y libreadline-dev
- name: Install dependencies
run: shards install --without-development --release
- name: Run tests
run: crystal spec
- name: Build executable
run: shards build --release
- name: Run executable (help)
run: bin/deepl --help
- uses: actions/upload-artifact@v4
with:
name: deepl-cli-${{ matrix.os }}
path: bin/${{ matrix.os == 'windows' && 'deepl.exe' || 'deepl' }}