Update build_and_release.yml #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
|
||
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 }} |