Skip to content

Commit 6091006

Browse files
committed
feat: add build script
1 parent d71972c commit 6091006

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Build and Publish
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build:
11+
strategy:
12+
matrix:
13+
include:
14+
- os: ubuntu-latest
15+
target: x86_64-linux
16+
- os: windows-latest
17+
target: x86_64-windows
18+
- os: macos-latest
19+
target: x86_64-macos
20+
- os: macos-latest
21+
target: aarch64-macos
22+
runs-on: ${{ matrix.os }}
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- name: Install Zig
27+
uses: euantorano/setup-zig@v1.2.1
28+
with:
29+
version: '0.14.0'
30+
31+
- name: Build
32+
run: |
33+
zig build -Doptimize=ReleaseFast -Dtarget=${{ matrix.target }}
34+
35+
- name: Upload artifact
36+
uses: actions/upload-artifact@v4
37+
with:
38+
name: plscommit-${{ matrix.target }}
39+
path: zig-out/bin/plscommit

0 commit comments

Comments
 (0)