tod 0.11.2

An unofficial Todoist command-line client

# This GitHub Actions workflow tests and then releases the tod application to the Cargo registry.

name: Cargo Build & Release
on:
  push:
    tags:
      - 'v*.*.*'

  workflow_dispatch: # Allows manual triggering of the workflow

permissions:
  contents: write
  pull-requests: write

env:
  CARGO_TERM_COLOR: always
  CARGO_INCREMENTAL: 0
  CARGO_PROFILE_TEST_DEBUG: 0
  CARGO_PROFILE_RELEASE_LTO: true
  CARGO_PROFILE_RELEASE_CODEGEN_UNITS: 1

jobs:
  cargo-release:
    name: Cargo Build & Release
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: Swatinem/rust-cache@v2
        with:
          cache-all-crates: true # Cache all crates to speed up builds

      - uses: taiki-e/install-action@nextest

    # Install the Rust toolchain
      - name: Install Rust Toolchain
        run: rustup toolchain install

      - name: Run platform tests # Run all tests with nextest.
        run: cargo nextest run --all-features

      - name: Release to cargo registry (crates.io) # Submit the package to the Cargo registry
        run: |
          cargo install auto-release
          auto-release -p tod
        env:
          CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} #Use the Cargo registry token from GitHub secrets