From ed829d3b13804de381fdf73131c03da58187acaa Mon Sep 17 00:00:00 2001 From: Jared Miller Date: Mon, 15 Dec 2025 12:09:52 -0500 Subject: [PATCH] Add a github release workflow --- .github/workflows/release.yml | 57 +++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..0b6e400 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,57 @@ +name: release + +on: + release: + types: [published] + +jobs: + build: + strategy: + matrix: + include: + - os: ubuntu-latest + artifact: sandbox-linux-x86_64 + - os: macos-latest + artifact: sandbox-macos-aarch64 + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: goto-bus-stop/setup-zig@v2 + with: + version: 0.15.2 + + - name: Install X11 dependencies (Linux) + if: matrix.os == 'ubuntu-latest' + run: sudo apt-get update && sudo apt-get install -y libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libxext-dev libxfixes-dev libgl1-mesa-dev + + - run: zig build -Doptimize=ReleaseFast + + - run: mv zig-out/bin/sandbox ${{ matrix.artifact }} + + - uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.artifact }} + path: ${{ matrix.artifact }} + + release: + needs: build + runs-on: ubuntu-latest + permissions: + contents: write + + steps: + - uses: actions/download-artifact@v4 + with: + path: artifacts + merge-multiple: true + + - run: chmod +x artifacts/* + + - uses: softprops/action-gh-release@v2 + with: + files: artifacts/*