name: Release
on:
push:
tags:
- "v*"
permissions:
contents: write
env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- os: macos-14
target: aarch64-apple-darwin
artifact: skiff-aarch64-apple-darwin
- os: macos-14
target: x86_64-apple-darwin
artifact: skiff-x86_64-apple-darwin
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
artifact: skiff-x86_64-unknown-linux-gnu
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- uses: Swatinem/rust-cache@v2
with:
key: release-${{ matrix.target }}
- name: Build release
run: cargo build --release --locked --target ${{ matrix.target }}
- name: Package
shell: bash
run: |
BIN="target/${{ matrix.target }}/release/skiff"
STAGE="${{ matrix.artifact }}"
mkdir -p "$STAGE"
cp "$BIN" "$STAGE/skiff"
chmod +x "$STAGE/skiff"
tar -czf "${STAGE}.tar.gz" "$STAGE"
shasum -a 256 "${STAGE}.tar.gz" > "${STAGE}.tar.gz.sha256"
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: |
${{ matrix.artifact }}.tar.gz
${{ matrix.artifact }}.tar.gz.sha256
publish:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: dist/*
body: |
## skiff ${{ github.ref_name }}
Progressive MCP / OpenAPI / GraphQL CLI (Rust).
### Install
```bash
brew tap samikh-git/tools && brew install skiff
cargo install skiff-cli
```
Or download a binary tarball from the assets below.
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
homebrew:
name: Bump Homebrew formula
needs: publish
if: ${{ !contains(github.ref_name, '-') }}
runs-on: ubuntu-latest
steps:
- uses: mislav/bump-homebrew-formula-action@v4
with:
formula-name: skiff
homebrew-tap: samikh-git/homebrew-tools
tag-name: ${{ github.ref_name }}
commit-message: |
skiff {{version}}
Automated by the skiff Release workflow.
env:
COMMITTER_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}