Skip to content

Commit

Permalink
Use nix in release pipeline; Add Linux releases
Browse files Browse the repository at this point in the history
  • Loading branch information
thmshmm committed May 5, 2024
1 parent 6c1d5d6 commit ef169a0
Showing 1 changed file with 13 additions and 17 deletions.
30 changes: 13 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ef169a0

Please sign in to comment.