From ef169a0f91eb6911e5192e8c2d9d7c7aec6984a1 Mon Sep 17 00:00:00 2001
From: Thomas Hamm
Date: Sun, 5 May 2024 14:32:34 +0200
Subject: [PATCH] Use nix in release pipeline; Add Linux releases
---
.github/workflows/release.yml | 30 +++++++++++++-----------------
1 file changed, 13 insertions(+), 17 deletions(-)
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 217869a..125536a 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -16,33 +16,29 @@ jobs:
matrix:
platform:
- release_for: macOS-x86_64
- os: macOS-latest
+ 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
+ os: macos-latest
target: aarch64-apple-darwin
- bin: taskui
- name: taskui-Darwin-aarch64.tar.gz
- command: build
+ - 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@v3
+ uses: actions/checkout@v4
- name: Build binary
- uses: houseabsolute/actions-rust-cross@v0
- with:
- command: ${{ matrix.platform.command }}
- target: ${{ matrix.platform.target }}
- args: "--locked --release"
- strip: true
+ run: |
+ nix develop --ignore-environment --command "cargo" "build" "--release" "--target" "${{ matrix.platform.target }}"
- name: Archive
shell: bash
run: |
- cd target/${{ matrix.platform.target }}/release
- tar czvf ../../../${{ matrix.platform.name }} ${{ matrix.platform.bin }}
+ cd result/bin
+ tar czvf ../../taskui-${{ matrix.platform.target }}.tar.gz taskui
cd -
if: startsWith(github.ref, 'refs/tags/v')
- name: Release