-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (50 loc) · 1.41 KB
/
build_and_release.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: goto-bus-stop/setup-zig@v2
with:
version: 0.12.0
- run: zig fmt --check .
build:
strategy:
matrix:
# os: [ubuntu-latest, macos-latest, windows-latest]
name: host=${{ matrix.config.os }} target=${{ matrix.config.target }}
config:
- os: ubuntu-latest
target: x86_64-linux-gnu
- os: macos-latest
target: aarch64-macos-none
- os: windows-latest
target: x86_64-windows-gnu
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: goto-bus-stop/setup-zig@v2
name: Setup zig
with:
version: 0.12.0
# - uses: actions/cache@v4.0.2
# with:
# enableCrossOsArchive: true
- run: zig fetch --save https://github.com/Not-Nik/raylib-zig/archive/devel.tar.gz
name: Get dependencies
- run: zig build -Doptimize=ReleaseSafe -Dtarget=${{ matrix.config.target }}
name: Build binary
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
zig-out/bin/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}