name: Pod Lint

on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main
    paths:
      - '.github/workflows/pod-lint.yml'
      - '*.podspec'
      - 'Gemfile*'
      - 'Source/**/*.*'

env:
  DEVELOPER_DIR: /Applications/Xcode_14.0.app/Contents/Developer

jobs:
  main:
    name: Pod Lint
    runs-on: macOS-12
    steps:
      - name: git checkout
        uses: actions/checkout@v2

      - name: ruby versions
        run: |
          ruby --version
          gem --version
          bundler --version
      - name: ruby setup
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: 3.1.2
          bundler-cache: true

      - name: pod lint
        run: bundle exec fastlane pod_lint