communique 1.0.0

Editorialized release notes powered by AI
name: Release

permissions:
  contents: write

on:
  workflow_call:
    inputs:
      tag:
        required: true
        type: string

env:
  CARGO_TERM_COLOR: always

jobs:
  upload-assets:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        include:
          - target: aarch64-apple-darwin
            os: macos-latest
          - target: x86_64-unknown-linux-gnu
            os: ubuntu-latest
          - target: aarch64-unknown-linux-gnu
            os: ubuntu-latest
          - target: x86_64-pc-windows-msvc
            os: windows-latest
          - target: aarch64-pc-windows-msvc
            os: windows-latest
    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
        with:
          ref: refs/tags/${{ inputs.tag }}
      - name: Import codesign certs
        if: startsWith(matrix.os, 'macos')
        uses: apple-actions/import-codesign-certs@fe74d46e82474f87e1ba79832ad28a4013d0e33a # v6
        with:
          p12-file-base64: ${{ secrets.CERTIFICATES_P12 }}
          p12-password: ${{ secrets.CERTIFICATES_P12_PASS }}
      - name: Install cross-compilation tools
        uses: taiki-e/setup-cross-toolchain-action@d62f33b587e73b0004731caebc7d2d46b18a7567 # v1
        with:
          target: ${{ matrix.target }}
      - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
        with:
          shared-key: rust-${{ matrix.target }}
      - name: Upload binary (macOS signed)
        if: startsWith(matrix.os, 'macos')
        uses: taiki-e/upload-rust-binary-action@f0d45ae91ee7b8ee928de7a9d04d893a08bcbec6 # v1
        with:
          bin: communique
          target: ${{ matrix.target }}
          ref: refs/tags/${{ inputs.tag }}
          token: ${{ secrets.GITHUB_TOKEN }}
          codesign: "Developer ID Application: Jeffrey Dickey (4993Y37DX6)"
          codesign_prefix: dev.jdx.
      - name: Upload binary (non-macOS)
        if: ${{ !startsWith(matrix.os, 'macos') }}
        uses: taiki-e/upload-rust-binary-action@f0d45ae91ee7b8ee928de7a9d04d893a08bcbec6 # v1
        with:
          bin: communique
          target: ${{ matrix.target }}
          ref: refs/tags/${{ inputs.tag }}
          token: ${{ secrets.GITHUB_TOKEN }}