prima-tracing 0.22.0

Prima.it opentelemetry standard library
Documentation
name: CD

on:
  release:
    types: [published]

env:
  CARGO_TERM_COLOR: always

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: taiki-e/install-action@ae532dedd825648efd18d9c49c9a443d0398ca0a # ratchet:taiki-e/install-action@cargo-make
      - name: Get version
        run: |
          VERSION=$(grep -m1 '^version' Cargo.toml | cut -d'"' -f2)
          echo "VERSION=$VERSION" >> $GITHUB_ENV
      - name: Check version
        if: ${{ github.event.release.tag_name != env.VERSION }}
        run: |
          echo "Github ref tag [${{ github.event.release.tag_name }}] is different from Cargo.toml version [${{ env.VERSION }}]"
          exit 1
      - run: cargo login "$CARGO_AUTH_KEY"
        env:
          CARGO_AUTH_KEY: ${{ secrets.CARGO_AUTH_KEY }}
      - run: cargo make release