Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions .github/workflows/crew-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: crew release

# Publish prebuilt `crew` binaries when a crew-v* tag is pushed, e.g.:
# git tag crew-v0.1.0 && git push origin crew-v0.1.0
on:
push:
tags:
- "crew-v*"
workflow_dispatch:
inputs:
tag:
description: "Tag to build (e.g. crew-v0.1.0)"
required: true

permissions:
contents: write

jobs:
build:
name: build ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
target: aarch64-apple-darwin
- os: macos-latest
target: x86_64-apple-darwin
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Build release binary
working-directory: tui
run: cargo build --release --locked --target ${{ matrix.target }}
- name: Package
run: |
set -euo pipefail
ref="${{ github.event.inputs.tag || github.ref_name }}"
name="crew-${ref}-${{ matrix.target }}"
bindir="tui/target/${{ matrix.target }}/release"
tar -czf "${name}.tar.gz" -C "${bindir}" crew
shasum -a 256 "${name}.tar.gz" > "${name}.tar.gz.sha256"
- uses: actions/upload-artifact@v4
with:
name: crew-${{ matrix.target }}
path: |
*.tar.gz
*.tar.gz.sha256

release:
name: publish release
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true
- name: Create / update the release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.event.inputs.tag || github.ref_name }}
name: ${{ github.event.inputs.tag || github.ref_name }}
generate_release_notes: true
files: |
dist/*.tar.gz
dist/*.tar.gz.sha256
4 changes: 4 additions & 0 deletions tui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ cargo build --release
The binary lands at `tui/target/release/crew`. Regenerate the website after UI
changes with `python3 site/gen.py` (captures live `--snapshot` frames).

**Prebuilt binaries.** Pushing a `crew-v*` tag builds and attaches
`crew-<tag>-<target>.tar.gz` (macOS arm64/x86_64, Linux x86_64) to a GitHub
Release via `.github/workflows/crew-release.yml`.

## Run

From anywhere inside a repo (it resolves the git toplevel and scopes to it):
Expand Down
Loading