Skip to content

Commit c5314af

Browse files
committed
Add Actions workflow to build and upload releases
1 parent abde765 commit c5314af

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Build Release Binaries
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
workflow_dispatch:
8+
9+
defaults:
10+
run:
11+
shell: bash -euxo pipefail {0}
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v6
18+
19+
- uses: mlugg/setup-zig@v2
20+
with:
21+
version: 0.15.2
22+
23+
- name: Build
24+
run: |
25+
zig build release
26+
27+
- name: Upload Release Artifacts
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
TAG: ${{ github.ref_name }}
31+
run: |
32+
(
33+
cd zig-out/bin/
34+
gh release create \
35+
"${TAG}" \
36+
--title "${TAG} Release" \
37+
*
38+
)

0 commit comments

Comments
 (0)