Skip to content

Update build_and_release.yml #8

Update build_and_release.yml

Update build_and_release.yml #8

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 }}

Check failure on line 24 in .github/workflows/build_and_release.yml

View workflow run for this annotation

GitHub Actions / CI

Invalid workflow file

The workflow is not valid. .github/workflows/build_and_release.yml (Line: 24, Col: 15): Unrecognized named-value: 'matrix'. Located at position 1 within expression: matrix.config.os .github/workflows/build_and_release.yml (Line: 24, Col: 15): Unexpected value '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 }}