apollo-logger 0.3.0

A simple logging library for Rust
Documentation
name: Publish

on:
  release:
    types: [published, prereleased]

env:
  CARGO_TERM_COLOR: always
  CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_TOKEN }}

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout code
        uses: actions/checkout@v4

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

      - name: Install cargo-edit
        run: cargo install cargo-edit

      - name: Get version from release tag
        id: get_version
        run: echo "CRATE_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT

      - name: Set package version
        run: cargo set-version ${{ steps.get_version.outputs.CRATE_VERSION }}

      - name: Check before publish
        run: cargo check --verbose

      - name: Build before publish
        run: cargo build --release --verbose

      - name: Run tests before publish
        run: cargo test --release --verbose

      - name: Publish to Crates.io
        run: cargo publish --allow-dirty