xorcist 0.1.3

A TUI client for jj (Jujutsu VCS)
name: release

on:
  push:
    tags:
      - "v*.*.*"
  workflow_dispatch:

permissions:
  contents: write

jobs:
  create-release:
    name: create GitHub release
    # Guard against workflow_dispatch on branches.
    if: startsWith(github.ref, 'refs/tags/')
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: create release for tag
        uses: taiki-e/create-gh-release-action@v1
        with:
          token: ${{ secrets.GITHUB_TOKEN }}

  build-and-upload:
    name: build and upload (${{ matrix.target }})
    # Guard against workflow_dispatch on branches.
    if: startsWith(github.ref, 'refs/tags/')
    needs: create-release
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        include:
          - os: ubuntu-latest
            target: x86_64-unknown-linux-gnu
          # Intel runner for native x86_64 macOS builds.
          - os: macos-15-intel
            target: x86_64-apple-darwin
          # Apple Silicon runner for native aarch64 builds.
          - os: macos-15
            target: aarch64-apple-darwin

    steps:
      - uses: actions/checkout@v4

      - name: install Rust toolchain
        uses: dtolnay/rust-toolchain@stable
        with:
          toolchain: 1.88.0
          targets: ${{ matrix.target }}

      - name: build and upload release asset
        uses: taiki-e/upload-rust-binary-action@v1
        with:
          bin: xor
          target: ${{ matrix.target }}
          archive: xorcist-$tag-$target
          include: README.md,LICENSE
          checksum: sha256
          token: ${{ secrets.GITHUB_TOKEN }}