GitHub Actions YaML string comparison

YaML is used by GitHub Actions workflow expressions. The “if” conditional logic for a task uses comparison operators that also work to compare strings, especially useful for version numbers.

jobs:

  matlab:

    strategy:
      matrix:
        release: [R2022a, R2023b]

    steps:

    - name: Run Matlab tests (buildtool)
      if: ${{ matrix.release >= 'R2022b' }}
      uses: matlab-actions/run-build