Skip to content

Use nix in release pipeline; Add Linux releases #56

Use nix in release pipeline; Add Linux releases

Use nix in release pipeline; Add Linux releases #56

Workflow file for this run

name: release
on:
push:
branches: [ "**" ]
tags: [ "v**" ]
pull_request:
permissions:
contents: write
jobs:
release:
name: Release - ${{ matrix.platform.release_for }}
strategy:
matrix:
platform:
- release_for: macOS-x86_64
os: macos-latest
target: x86_64-apple-darwin
- release_for: macOS-aarch64
os: macos-latest
target: aarch64-apple-darwin
- release_for: Linux-x86_64
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- release_for: Linux-aarch64
os: ubuntu-latest
target: aarch64-unknown-linux-gnu
runs-on: ${{ matrix.platform.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: cachix/install-nix-action@v25
- name: Build binary
run: |
nix build
- name: Archive
shell: bash
run: |
tar czvf taskui-${{ matrix.platform.target }}.tar.gz -h -C result/bin taskui
if: startsWith(github.ref, 'refs/tags/v')
- name: Release
uses: softprops/action-gh-release@v2
with:
files: "taskui-*.tar.gz"
if: startsWith(github.ref, 'refs/tags/v')