system-hook 0.2.2

shook: webhook server to automatically update production servers
name: release
on:
  push:
    tags:
      - 'v[0-9]+*'
  workflow_dispatch:

jobs:
  release:
    name: Release - ${{ matrix.platform.release_for }}
    strategy:
      matrix:
        platform:
          - release_for: linux-x86_64
            os: ubuntu-24.04
            target: x86_64-unknown-linux-gnu
            bin: shook
            name: shook-x86_64-unknown-linux-${{ github.ref_name }}.tar.gz
            command: build
          - release_for: linux-aarch64
            os: ubuntu-24.04
            target: aarch64-unknown-linux-gnu
            bin: shook
            name: shook-aarch64-unknown-linux-gnu-${{ github.ref_name }}.tar.gz
            command: build

    runs-on: ${{ matrix.platform.os }}
    permissions:
      contents: write
    steps:
      - uses: actions/checkout@v3
      - name: build
        uses: houseabsolute/actions-rust-cross@v0
        with:
          command: ${{ matrix.platform.command }}
          target: ${{ matrix.platform.target }}
          args: "--locked --release"
          strip: true
      - name: package as archive
        shell: bash
        run: |
          cd target/${{ matrix.platform.target }}/release
          tar czvf ../../../${{ matrix.platform.name }} ${{ matrix.platform.bin }}
          cd -
      - name: publish artifacts
        uses: softprops/action-gh-release@v1
        with:
          draft: true
          files: "shook-*"
          body: |
            This is a new release for system-hook.
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}