Skip to content

fix: correct build.yml #111

fix: correct build.yml

fix: correct build.yml #111

Workflow file for this run

name: Build artifacts
on:
push:
tags:
- '*'
workflow_dispatch:
jobs:
build:
strategy:
matrix:
include:
- os: macos-latest
arch: macos-x86_64
- os: macos-14
arch: macos-aarch64
- os: ubuntu-latest
arch: linux-x86_64
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: goto-bus-stop/setup-zig@v2
- name: install dependencies (apt)
if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: |
sudo apt-get update
sudo apt-get install \
libnotcurses-core-dev lua5.4
- name: Set up homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
if: $${{ startsWith(matrix.os, 'macos') }}
- name: install dependencies (homebrew)
if: $${{ startsWith(matrix.os, 'macos') }}
run: |
brew install pkg-config lua notcurses
- name: build seamstress (linux)
if: $${{ startsWith(matrix.os, 'ubuntu') }}
run: |
zig build -Doptimize=ReleaseSafe -Dcpu=x86_64 --summary all
- name: build seamstress (macos)
if: $${{ startsWith(matrix.os, 'macos') }}
run: |
zig build -Doptimize=ReleaseSafe --summary all
- name: zip artifact
run: |
cd zig-out/ && tar -czvf ../seamstress-${{ matrix.arch }}-${{ github.ref_name }}.tar.gz .
- uses: actions/upload-artifact@v2
with:
name: ${{ matrix.arch }}-${{ github.ref_name }}
path: |
./*.tar.gz
release:
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
- uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
draft: true
files: |
./macos-aarch64-${{ github.ref_name }}/*.tar.gz
./macos-x86_64-${{ github.ref_name }}/*.tar.gz
./linux-x86_64-${{ github.ref_name }}/*.tar.gz