Skip to content

Commit

Permalink
Init release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
photex committed Jun 8, 2024
1 parent 934966f commit d618ecc
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
name: Standard Build

on: push

jobs:
Expand All @@ -19,4 +21,4 @@ jobs:
with:
name: ziege-${{matrix.target}}
path: zig-out

46 changes: 46 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Release

on:
push:
tags:
- "v*.*.*"

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Zig
uses: korandoru/setup-zig@v1
with:
zig-version: 0.13.0
- name: Windows x86_64
run: zig build -Doptimize=ReleaseFast -Dtarget=x86_64-windows -p _release/windows-x86_64
- name: Linux x86_64
run: |
zig build -Doptimize=ReleaseFast -Dtarget=x86_64-linux -p _release/linux-x86_64
cp _release/linux-x86_64/bin/ziege ziege-linux-x86_64
- name: MacOS x86_64
run: |
zig build -Doptimize=ReleaseFast -Dtarget=x86_64-macos -p _release/macos-x86_64
cp _release/macos-x86_64/bin/ziege ziege-macos-x86_64
- name: Linux aarch64
run: |
zig build -Doptimize=ReleaseFast -Dtarget=aarch64-linux -p _release/linux-aarch64
cp _release/linux-aarch64/bin/ziege ziege-linux-aarch64
- name: MacOS aarch64
run: |
zig build -Doptimize=ReleaseFast -Dtarget=aarch64-macos -p _release/macos-aarch64
cp _release/macos-aarch64/bin/ziege ziege-macos-aarch64
- name: Zip Windows Build
run: zip ziege-windows.zip -j _release/windows-x86_64/ziege.exe scripts/zig.bat scripts/zls.bat
- name: Release
uses: softprops/action-gh-release@v2
with:
files: |
ziege-windows.zip
ziege-linux-x86_64
ziege-linux-aarch64
ziege-macos-x86_64
ziege-macos-aarch64

0 comments on commit d618ecc

Please sign in to comment.