authvault 0.1.0

Authentication and authorization vault with multi-provider support
Documentation
name: Release

on:
  push:
    branches: [main]
    paths-ignore:
      - 'docs/**'
      - '**.md'

permissions:
  contents: write
  packages: write

jobs:
  release:
    runs-on: ubuntu-latest
    if: contains(github.event.head_commit.message, 'release:') || contains(github.event.head_commit.message, 'chore(release)')
    outputs:
      version: ${{ steps.version.outputs.version }}
    steps:
      - uses: actions/checkout@v7
        with:
          fetch-depth: 0

      
      - name: Setup Rust
        uses: dtolnay/rust-toolchain@stable

      - name: Build
        run: cargo build --release

      - name: Test
        run: cargo test --release

      - name: Determine version
        id: version
        run: |
          VERSION=$(grep '^version' Cargo.toml | head -1 | cut -d'"' -f2)
          echo "version=$VERSION" >> $GITHUB_OUTPUT

      - name: Publish to crates.io
        run: |
          cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
      

  promote:
    needs: release
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7

      - name: Promote to staging
        uses: KooshaPari/phenotypeActions/promote@main
        with:
          version: ${{ needs.release.outputs.version }}
          channel: beta
          registry: crates.io