ntu/.github/workflows/release.yml
dschlueter 53c10f1913 feat: CI/CD, Bash-Completion und README-Verbesserungen
- GitHub Actions CI Pipeline (Tests, Clippy, Format-Checks)
- GitHub Actions Release Pipeline (Multi-Platform Builds)
- Bash-Completion Script für Shell-Autovervollständigung
- Zsh-Completion Script (_ntu)
- README Badges (CI, Release, Version, License)
- Installationsanleitung für Pre-built Binaries
- Alte build.yaml entfernt (ersetzt durch moderne ci.yml)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-10 10:39:44 +01:00

66 lines
1.8 KiB
YAML

name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
release:
name: Release
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
artifact_name: ntu
asset_name: ntu-linux-x86_64
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
artifact_name: ntu
asset_name: ntu-linux-x86_64-musl
- os: macos-latest
target: x86_64-apple-darwin
artifact_name: ntu
asset_name: ntu-macos-x86_64
- os: macos-latest
target: aarch64-apple-darwin
artifact_name: ntu
asset_name: ntu-macos-arm64
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
target: ${{ matrix.target }}
- name: Install musl-tools (Linux musl only)
if: matrix.target == 'x86_64-unknown-linux-musl'
run: sudo apt-get update && sudo apt-get install -y musl-tools
- name: Build
run: cargo build --release --target ${{ matrix.target }}
- name: Strip binary (Linux only)
if: startsWith(matrix.os, 'ubuntu')
run: strip target/${{ matrix.target }}/release/${{ matrix.artifact_name }}
- name: Compress binary
run: |
cd target/${{ matrix.target }}/release
tar czf ${{ matrix.asset_name }}.tar.gz ${{ matrix.artifact_name }}
mv ${{ matrix.asset_name }}.tar.gz ../../..
- name: Upload binary to release
uses: softprops/action-gh-release@v2
with:
files: ${{ matrix.asset_name }}.tar.gz
body_path: CHANGELOG.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}