-
-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (36 loc) · 1.04 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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' }}