-
-
Notifications
You must be signed in to change notification settings - Fork 12
56 lines (53 loc) · 1.61 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Build artifacts
on:
push:
tags:
- '*'
workflow_dispatch:
jobs:
build:
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: 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
if: $${{ ! startsWith(matrix.os, 'ubuntu') }}
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: install dependencies (homebrew)
if: $${{ ! startsWith(matrix.os, 'ubuntu') }}
run: |
brew install pkg-config lua notcurses
- name: build seamstress
run: |
zig build -Doptimize=ReleaseSafe --summary all
- name: zip artifact
run: |
cd zig-out/ && tar -czvf ../seamstress-${{ matrix.os }}-x86_64-${{ github.ref_name }}.tar.gz .
- uses: actions/upload-artifact@v2
with:
name: ${{ matrix.os }}-${{ 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-latest-x86_64-${{ github.ref_name }}/*.tar.gz
./ubuntu-latest-x86_64-${{ github.ref_name }}/*.tar.gz