jackdaw 0.3.1

A 3D level editor built with Bevy
Documentation
name: Release

on:
  push:
    tags: ["v*"]
  release:
    types: [published]

concurrency:
  group: release-${{ github.ref }}
  cancel-in-progress: false

permissions:
  contents: read

env:
  toolchain: nightly-2026-01-22

jobs:
  publish:
    name: Publish to crates.io
    runs-on: ubuntu-latest
    timeout-minutes: 60
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Install Rust toolchain
        uses: dtolnay/rust-toolchain@master
        with:
          toolchain: ${{ env.toolchain }}

      - name: Cache Rust artifacts
        uses: Swatinem/rust-cache@v2

      - name: Install dependencies
        run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libwayland-dev

      - name: Publish crates
        env:
          CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
        run: |
          # Publish in dependency order. Crates with no internal deps first,
          # then crates that depend on them, and the root application last.
          crates=(
            jackdaw_geometry
            jackdaw_widgets
            jackdaw_commands
            jackdaw_terrain
            jackdaw_avian_integration
            jackdaw_remote
            jackdaw_panels
            jackdaw_jsn
            jackdaw_camera
            jackdaw_feathers
            jackdaw_runtime
            jackdaw_node_graph
            jackdaw_animation
          )

          for crate in "${crates[@]}"; do
            echo "::group::Publishing $crate"
            cargo publish -p "$crate" --locked || echo "::warning::$crate publish failed (may already exist)"
            echo "::endgroup::"
            # Give the crates.io index time to update
            sleep 30
          done

          # Publish the root application crate last
          echo "::group::Publishing jackdaw"
          cargo publish --locked
          echo "::endgroup::"