Build artifacts #115
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |