name: CocoaPods

on:
  push:
    branches: [ main ]
    paths-ignore:
    - '*.md'
    - 'LICENSE'
    - 'Package*.swift'
    - '**.xcodeproj**'
    - 'Source/SwiftPackage/**'
    - '.github/workflows/swiftpm.yml'
    - '.github/workflows/xcode.yml'
  pull_request:
    branches: [ main ]
    paths-ignore:
    - '*.md'
    - 'LICENSE'
    - 'Package*.swift'
    - '**.xcodeproj**'
    - 'Source/SwiftPackage/**'
    - '.github/workflows/swiftpm.yml'
    - '.github/workflows/xcode.yml'

jobs:
  pod-lib-lint:
    runs-on: macos-latest
    strategy:
      fail-fast: false
      matrix:
        PLATFORM: ["ios", "macos", "tvos", "watchos"]
        CONFIGURATION: ["Debug", "Release"]
    steps:
    - uses: actions/checkout@v2
    # Manually expanding out static frameworks to avoid making to many jobs.
    - name: Pod lib lint
      run:  |
        pod lib lint \
          --configuration=${{ matrix.CONFIGURATION }} \
          --platforms=${{ matrix.PLATFORM }} \
          GTMSessionFetcher.podspec
    - name: Pod lib lint - Use Static Frameworks
      run:  |
        pod lib lint --use-static-frameworks \
          --configuration=${{ matrix.CONFIGURATION }} \
          --platforms=${{ matrix.PLATFORM }} \
          GTMSessionFetcher.podspec

name: CocoaPods

on:
  push:
    branches: [ main ]
    paths-ignore:
    - '*.md'
    - 'LICENSE'
    - 'Package*.swift'
    - '**.xcodeproj**'
    - 'Source/SwiftPackage/**'
    - '.github/workflows/swiftpm.yml'
    - '.github/workflows/xcode.yml'
  pull_request:
    branches: [ main ]
    paths-ignore:
    - '*.md'
    - 'LICENSE'
    - 'Package*.swift'
    - '**.xcodeproj**'
    - 'Source/SwiftPackage/**'
    - '.github/workflows/swiftpm.yml'
    - '.github/workflows/xcode.yml'

jobs:
  pod-lib-lint:
    runs-on: macos-latest
    strategy:
      fail-fast: false
      matrix:
        PLATFORM: ["ios", "macos", "tvos", "watchos"]
        CONFIGURATION: ["Debug", "Release"]
    steps:
    - uses: actions/checkout@v2
    # Manually expanding out static frameworks to avoid making to many jobs.
    - name: Pod lib lint
      run:  |
        pod lib lint --verbose \
          --configuration=${{ matrix.CONFIGURATION }} \
          --platforms=${{ matrix.PLATFORM }} \
          GTMSessionFetcher.podspec
    - name: Pod lib lint - Use Static Frameworks
      run:  |
        pod lib lint --verbose --use-static-frameworks \
          --configuration=${{ matrix.CONFIGURATION }} \
          --platforms=${{ matrix.PLATFORM }} \
          GTMSessionFetcher.podspec

Make the `pod lib lint` steps verbose.
Make the `pod lib lint` steps verbose.

When something fails, CocoaPods tends to print a short line about what failed,
but some times when `xcodebuild` fails, that isn't much detail, so just enable
the verbose flag so there is a better chance that the problem can be figured
out (or realized it is some Xcode flake).
