Skip to content

Use nix in build, test, lint pipeline #35

Use nix in build, test, lint pipeline

Use nix in build, test, lint pipeline #35

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
bin: taskui
name: taskui-Darwin-x86_64.tar.gz
command: both
- release_for: macOS-aarch64
os: macOS-latest
target: aarch64-apple-darwin
bin: taskui
name: taskui-Darwin-aarch64.tar.gz
command: build
runs-on: ${{ matrix.platform.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build binary
uses: houseabsolute/actions-rust-cross@v0
with:
command: ${{ matrix.platform.command }}
target: ${{ matrix.platform.target }}
args: "--locked --release"
strip: true
- name: Archive
shell: bash
run: |
cd target/${{ matrix.platform.target }}/release
tar czvf ../../../${{ matrix.platform.name }} ${{ matrix.platform.bin }}
cd -
if: startsWith(github.ref, 'refs/tags/v')
- name: Release
uses: softprops/action-gh-release@v1
with:
files: "taskui-*.tar.gz"
if: startsWith(github.ref, 'refs/tags/v')