obelisk 0.35.2

Deterministic workflow engine
name: release-5-verify-github-release

on:
  workflow_dispatch:
    inputs:
      ref:
        description: "The ref (branch or SHA) to obtain the tag"
        required: false
        type: string
  workflow_run:
    workflows:
      - release-2-cargo-publish
    types:
      - completed

defaults:
  run:
    shell: bash -xe {0}

jobs:
  verify-assets:
    name: ${{ matrix.runner }}-${{ matrix.file }}
    runs-on: ${{ matrix.runner }}
    if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
    strategy:
      fail-fast: false
      matrix:
        include:
          - runner: ubuntu-22.04
            file: obelisk-x86_64-unknown-linux-gnu.tar.gz
          - runner: ubuntu-22.04
            file: obelisk-x86_64-unknown-linux-musl.tar.gz
          - runner: macos-14
            file: obelisk-x86_64-apple-darwin.tar.gz
          - runner: macos-14
            file: obelisk-aarch64-apple-darwin.tar.gz
    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
        with:
          # Use the ref if provided, otherwise obtain the parent workflow branch, defaults to main.
          ref: ${{ github.event.inputs.ref || github.event.workflow_run.head_branch }}

      - id: git-info
        run: |
          VERSION="$(grep -m1 '^version = "' Cargo.toml | cut -d'"' -f2)"
          echo "version=$VERSION" >> $GITHUB_OUTPUT
          echo "tag=v$VERSION" >> $GITHUB_OUTPUT
          echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT

      - run: |
          mkdir temp
          cd temp
          # download the binary from GitHub Releases
          FILE="${{ matrix.file }}"
          curl --fail -L -o "$FILE" \
            https://github.com/obeli-sk/obelisk/releases/download/$TAG/$FILE
          tar xzfv "$FILE"
          ./obelisk --version | grep $VERSION
          ./obelisk generate config obelisk.toml
          ./obelisk server verify
        env:
          TAG: ${{ steps.git-info.outputs.tag }}
          VERSION: ${{ steps.git-info.outputs.version }}