Skip to content

fix(cli): restore auto staging and diff selection #24

fix(cli): restore auto staging and diff selection

fix(cli): restore auto staging and diff selection #24

Workflow file for this run

name: release
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
use_cross: false
allow_failure: false
- os: macos-14
target: aarch64-apple-darwin
use_cross: false
allow_failure: false
- os: macos-14
target: x86_64-apple-darwin
use_cross: false
allow_failure: false
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.allow_failure }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Install cross
if: matrix.use_cross
run: cargo install cross --locked
- name: Build
run: |
if [ "${{ matrix.use_cross }}" = "true" ]; then
cross build --locked --release --target ${{ matrix.target }}
else
cargo build --locked --release --target ${{ matrix.target }}
fi
- name: Package
run: |
BIN=goodcommit
ARTIFACT=${BIN}-${{ matrix.target }}.tar.gz
tar -czf "$ARTIFACT" -C "target/${{ matrix.target }}/release" "$BIN"
- name: Checksums
run: |
ARTIFACT=goodcommit-${{ matrix.target }}.tar.gz
OUT=checksums-${{ matrix.target }}.txt
if command -v shasum >/dev/null 2>&1; then
shasum -a 256 "$ARTIFACT" > "$OUT"
else
sha256sum "$ARTIFACT" > "$OUT"
fi
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: release-${{ matrix.target }}
path: |
goodcommit-${{ matrix.target }}.tar.gz
checksums-${{ matrix.target }}.txt
publish:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true
pattern: release-*
- name: Upload release assets
uses: softprops/action-gh-release@v2
with:
files: dist/*