Skip to content

Build Assets

Build Assets #1

Workflow file for this run

name: Build Assets
on:
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
build-assets:
name: Build (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os:
- macOS-latest
- ubuntu-latest
- windows-latest
steps:
- uses: actions/checkout@v6
- run: mkdir dist
- name: Build
run: cargo build --release
- name: Upload (Unix)
if: ${{ runner.os != 'Windows' }}
env:
BUILD_TARGET: ${{ runner.os }}-${{ runner.arch }}
run: |
tar -C target/release/ -czvf "fancy-tree-$BUILD_TARGET.tar.gz fancy-tree
mv "fancy-tree-$BUILD_TARGET.tar.gz" dist/
- name: Upload (Windows)
if: ${{ runner.os == 'Windows' }}
run: |
zip -v -9 "fancy-tree-$BUILD_TARGET.zip" target/release/fancy-tree.exe
mv "fancy-tree-$BUILD_TARGET.zip" dist/
- uses: actions/upload-artifact@v6
id: upload-artifact
with:
name: ${{ runner.os }}-${{ runner.arch }}
path: dist/*
if-no-files-found: error
- run: echo "Uploaded artifact to ${{ steps.upload-artifact.outputs.artifact-url }}"