name: Publish Crates

on:
  workflow_dispatch:
  release:
    types: [published]

jobs:
  publish:
    name: Publish Crates
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
        with:
          persist-credentials: false

      - name: Setup Mise
        uses: immich-app/devtools/actions/use-mise@cd24790a7f5f6439ac32cc94f5523cb2de8bfa8c # use-mise-action-v1.1.0
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}

      - name: Publish
        run: mise publish --workspace
