Github Action 備忘録

Windows でエラー

jobs:
  drools-build:
    ...
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest]
      ...
    steps:
      ...
      - name: Backward Compatibility Test
        run: |
          CURRENT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
          echo "Current version: $CURRENT_VERSION"

Windows だけエラー

The term 'CURRENT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)' is not recognized
as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a
path was included, verify that the path is correct and try again.

shell: bash をつければよい。(Windows のデフォルトは PowerShell)